Rejection, for a writer, is an occupational hazard. It really is good to develop a thick skin, not to mention a coping mechanism, like cussing, target practice, or splitting wood.

And writers and agents agree: you’ve got to suck it up, buttercup! Rejection happens to everybody! (Even those that sign with Dream Agent in their first round find out, very soon, that it’s not sunshine, lollipops, and rainbows every day.)
I always swore that I would never be one of those writers who gave a false narrative about how it was so easy to be a writer and to succeed. I have failed, and failed, and failed, and failed. A lot of good writers whom I utterly respect are in the same boat. One writer gets an awesome agent, then is unable to make a sale for 12 years. One writer publishes a number of books, then gets orphaned by her editor, or dropped from her publisher due to “a poor sales record” (which btw is a bunch of bull due to corporate marketing departments).
Agent Jenny Bent says, “This sounds trite, but you cannot give up and you cannot stop
believing in yourself. So many incredibly successful writers spent
years and years trying to break into this business and you should take
inspiration from how hard they worked and how they never stopped
So take inspiration from a few times that I got kicked in the butt, metaphorically speaking.
One: After my dad’s funeral last year, I came home to find a little note from an agent waiting in my inbox. “Dear Melinda: We utterly reject your full MS. Have a nice day!” No, he didn’t actually write that, because there’s no way on
earth the guy could have known. It was really bad timing. But you have to admit, it makes a good story.
Two: Way back when I was starting out as a writer, I discovered the Delacorte Press Prize for a First Young Adult Novel (now defunct), and got so excited that I shot my MS at them with a cannon and didn’t proofread. I got a rejection back from some poor bleary-eyed editor who wrote,
“PLEASE USE 12 POINT TYPE,” (the MS was in 10 point) “AND FOR GOD’S SAKE CHECK YOUR SPELLING.” According to my cover letter, my story was set in a “shite oak forest.” This is what we call a learning experience.
Three: An awesome agent offered me representation for my YA
novel, Shy Gal Runs Screaming from Love.
Yay! Only problem was, I had a bunch of MG raccoon novels, which were not novels that she represented. I really, really, really wanted an agent,
but at the same time, I had the same misgivings about working with her, because
MG fantasy was a huge part of my work. We parted amicably. Oh,
man. But really, I’m better served by somebody who is comfortable with
representing my whole body of work. So the agent search goes on.
What have your most memorable rejections been? 
P.S. Typo of the day: “We partied amicably.”