Ok, I know this sounds weird, but I assure you it works. It might be harder if you're blinded by pain...but it's worth a try.
Number one way is to picture all the pain and compress it into a little ball. Put your fingertips to your forehead/temples/where ever and then picture that little ball of pain oozing out of ur head, through your fingertips and then dissipating in the air.
The second way I use when something hurts is that I try to pinpoint the exact place where it hurts. I find that, when I do this, I work it out and think "Ah, that's where it hurts" only to find it's not that exact place. No matter where you look...the pain isn't actually there, it moves around until you figure, it's nto anywhere!
Or, try to figure out exactly what pain IS. This is more for when you're feeling cold. What is that feeling? What is the concept of "pain"? Why does it hurt? It shouldn't hurt. This is illogical. There is nothing wrong up there, so why is it hurting? Ah, that's why, because it doesn't actually hurt, there is no pain, it's just my body being tricky...
Mind over matter. Tricking yourself into thinking there is no pain.
Heh