This hurt is often amplified by the fact that most writers, I'd say, were probably pretty good students and have grown up with adults, from their preschool teacher to the chair of their thesis committee, praising their creativity and their ability to use language -- to the point where thinking of themselves as gifted writers is a loadbearing wall in the psychological framework of their self-concept. Then some anonymous stranger, on whom they've pinned (or penned) their hopes of publication and validation, says with neither fanfare nor apology "no thanks." The rejection notice, whether delivered in an old-fashioned envelope or via email, can cast a shadow over what had been a pretty good day, or it can be the crushing proverbial last straw in a day that was forged in hell and delivered to you personally by the devil himself.
I know this is easy to write and much, much harder to do -- but you just have to shake it off. It's perfectly all right to tell that anonymous editor, who probably is friendless in this world anyway, you suspect at the moment, "___________________" (fill in the blank with whatever makes you feel better) -- as long as you don't actually tell him, because, even though he rejected you, the fact remains he (or she of course) is doing something that I believe (and you must too) is vitally important, and almost certainly for very little, if any, pay and even less, if any, appreciation.
Besides, writers who burn their bridges, no matter how gratifying it may feel at the time, are ones who are doing precisely the opposite of what they need to be doing, which is developing a network of contacts in the writing/editing/publishing community. And besides further, a more productive response is to become even more determined to place that piece of writing (in hopes that the rejecting editor happens upon it someday and regrets his decision -- though, given the volume of work editors have to deal with, the odds of his remembering it ... the next day, leave be months or years later, is, let's say, slim).
So when the rejections come, tell yourself that all those people who've praised your ability to write (those parents and teachers and best friends and siblings and boyfriends who were trying to get past first-base) were dead-on right about you and your work: it is darn good. So, then, why was it rejected (again and again and again, in many cases)? There are a plethora of possible reasons, and once in a very great while, an editor may let you know the reason; otherwise, you just have to accept that it's one or more of the following:
Limited space and an overwhelming volume of submissions: Even the most obscure journals or magazines get thousands of submitted pieces for every issue; and even journals that have managed to establish only a minimal presence in the publishing world will receive tens of thousands; while better known outlets can easily receive in excess of 100,000 stories, poems, and creative essays from which to select only a few dozen at most. Statistically, journals tend to publish less than one percent of the submissions they receive.
Specific needs: Often times editors will be looking for some highly specialized sort of work, due to a theme for an issue, for example, and your piece -- though well liked by the editor -- has to be declined because it doesn't fit the magazine's current agenda. In this case, you may get a note telling you as much and encouraging you to try them again -- this kind of rejection is disappointing but doesn't hurt nearly as much. Alas, however, this scenario may match your submission's rejection exactly, and you'll never know.
Plain old subjectivity: There's no getting around the fact that selecting pieces for publication is a highly subjective process. Let me repeat and italicize that phrase: highly subjective. What one editor loves and would retrieve from the lip of a roiling volcano, another editor might joyfully kick into the teeth of that seething lava if given the opportunity. Moreover, the next day, with the same story or poem, these two hypothetical editors could exchange roles -- why do we want sushi for dinner one day, and a juicy cheeseburger for dinner the next? We humans are fickle, and for editors that fickleness definitely comes into play when deciding what to publish and what to reject. (I have a good story that illustrates this fickleness, but I'll save it for another time -- that's what we call "a teaser.")
Well, I've already written more than I intended to on the subject of rejection. So let's leave it at this: rejection is the yin to the yang of publication success. It's absolutely necessary and inseparable, hence unavoidable. And given what I've said about the odds against publication, you might be feeling discouraged and wondering "Why bother trying?" Here's why: Good writing will find publication -- it may (in fact, probably will) require patience and persistence, but it will find publication. As a writer who wants to publish, you must have faith in this statement, and at this point you'll just have to trust me that it's true.