At some point all writers receive a rejection letter. There is only one way to deal with this. Take a voodoo doll of the editor who rejected the story and stab it repeatedly in the crotch. It's very therapeutic. And you never know, one day the voodoo might just work.
But on a more practical level ...
One way to lessen the pain of rejection is to submit as many different stories to as many different markets as possible. It's a lot less distressing to have a story rejected if you know you've still got another dozen stories that could still be accepted elsewhere.
And as soon as a story gets rejected submit it to someone else. Many's the time I've had a story deemed unpublishable by one magazine only to immediately sell it to another magazine where it receives rave reviews.
Unfortunately I'm leaning more towards novellas and novelettes in my current writing. Not only do these tend to take longer to write, meaning I have less stories to submit, but the market for stories of that length is a little more limited. So I'm having trouble following my own advice.
Which means it's back to the voodoo doll.