If you hate being rejected, don't try to be an author.
Actually, if everyone took that advice, there wouldn't be any authors - I don't know anyone in this business who doesn't hate that horrible sensation that an agent or publisher could turn down your work. There are a few notable exceptions who went straight into being published without a single rejection, but the vast majority of even the greats, let alone us humble scribblers, have a satisfyingly thick pile of rejection letters, each one a slap in the face that really hurt.
Inevitably, once rejected, we try to justify and explain. We search for every ounce of meaning in those few terse lines. Perhaps they said something that suggests they quite like my book. But did they really mean it, or were they being polite? Is it a form letter, or is it personal? Does it tell me something that can help me make my book more marketable elsewhere?
It is impossible not to do it, but there is limited benefit to poring over the entrails of a rejection letter. It's a bit different if you have an agent. A rejection from a publisher to an agent is often a communication between two people who know each other. It is much more likely to explain why they rejected your book and mean it. But even there the evil missive can be quite brisk and uninformative.
The only advice I can offer is the old, old idea of getting back on the horse immediately. Don't dwell on rejection. Send out a copy of your submission to another publisher or agent. If you've run out of places to send your book, start work on the next. The only way to cope with this visceral kick in the ego is already to be working on future success.
Of course, you may say that this sounds too much like hard work. It is. No one sane would do it. But remind where anyone said that writing was an easy life?