Okay, here goes -
1. Rationalisation. (you know; it's not personal, it doesn't mean you can't write etc) If however that doesn't do it for you try,
2. Staying in your pajamas all day, eating ice cream and watching Gone with the wind (or whatever floats your boat of course). This will hopefully make you feel better but if you're still traumatised how about,
3. Go out with your friends, get paralytic and do embarrassing things you can't remember in the morning only to find they've been recorded by your "friends" and now your rendition of I will survive on the pool table while wearing a traffic cone has two million hits on YouTube. Now you have humiliation, mortification and horror to distract you from your rejection.
4. Realise that those who rejected you are obviously idiots/morons and not worthy of your talent. When you are more famous then J.K you will be able to ignore them at posh parties, knowing they are suffering at their own inadequacies for rejecting your work in the first place.
5. Okay this is my favourite and I must admit I stole it from Stephen King and his memoir "On Writing" - apparently in his youth he had a babysitter who would frequently decide to hold him down and fart on his head. In retrospect Stephen felt this helped him cope with his frequent rejections. So, remember the next time you get rejected that bad as it may seem at least noone held you down and farted on your head!