My techniques: Find a good breathing pattern that works and don't let your mind wander. Be mentally prepared and keep in mind that the hill will even out eventually.
Drink before you need to drink, eat sugar when you're feeling like you're going to bonk.
It's all mental, really.