Most mechanics don't bother to depressurize the fuel system before changing the filter.
Any easy way to do so if you feel you must, is to find the fuel pressure gauge attaching port on the fuel rail near the injectors on the engine. It looks a little like a tire valve (to which it is related). Remove the cap and depress the valve core (just like on a tire) with a small screwdriver until it quits spurting, then go and change the filter.
You can also wait about an hour or two and the pressure has usually dropped off quite a bit.
Even with the pressure relieved, you will still spill some fuel. You can't help it when you open the fuel line.