Well, for starters, make sure you're getting it done with a needle instead of a gun. It's safer and it actually hurts less. You won't risk infection or shattering your cartilage, either. Needles beat guns every day of the week. Staying hydrated and eating beforehand will absolutely help you feel better. And, 100% agree with Laura. Talk to your piercer and be honest if you're scared. They'll talk you through it.
Keep in mind as well that the actual piercing itself can't really hurt that much. Assuming you're getting a helix piercing (the rim of the upper ear), the cartilage there is relatively thin and flat. The thicker the cartilage, the more painful the piercing. So, as far as cartilage piercings go, the one you're getting is likely pretty low on the pain scale in the first place.
Finally, the pain of a piercing is 100% temporary. You'll feel a great deal of pressure, followed by a hard pinch, followed by a rush of warmth. That's it. You'll experience some tenderness during the healing process, which takes several months. But if you're keeping the piercing clean (with saline solution/salt water, not peroxide or other harsh chemicals), that will help keep the tenderness to a minimum.