Learning to deal with rejection takes time, and it takes a lot of behavior modification. You have to learn that rejection isn't always personal. Sometimes it's just business. Other times, you can never know the whole story of what's going on in someone else's life to know whether their reasons for rejecting you are because of something having to do with them or something having to do with you.
Dealing with rejection means you have to steel yourself, prepare for it. You have a 50-50 chance your story will be rejected; you have a 50-50 chance of getting the date, or not; and you have a 50-50 chance your friend will hate the poem. You have to recognize the situations in which you may possibly experience rejection as an outcome, and then prepare for it. Maybe it will turn out fine in the end, but knowing it may not, and preparing yourself for that, helps in coping with the rejection and not taking it personally (even if it is actually personal).
So, how is rejection good? It hurts. Steeled or not, it still hurts. It still shocks. It still sucks. But--you can learn from it. For anything that happens, if you can learn from it, then it wasn't completely pointless; it wasn't a complete waste of time; it wasn't all for nothing. What you may learn from that rejection will depend on the situation. You may learn you're a terrible poet, and you'll have to accept that. You could learn that you shouldn't ask people out who are of that personality type, no matter how much you like them.
You could learn any number of things, but in order to do so, you cannot mope. You can't bitch and complain that nothing ever goes right. You can't beat yourself up about it. I've said it before, dear readers, and I'll say it again: shit happens. Rejection is just one of those shit things that happens sometimes.
But if you never put yourself out there, if you never take some risks--you don't have to invest your life savings in the stock market or skydive out of an airplane at 20,000 feet to take risks--you'll never experience the rewards that do occasionally follow. Your story may get published. The person will say yes to dinner. Your friend thinks your poem is reminiscent of an early Robert Frost. Whatever the case may be, risks are a part of life, a part of humanity. Greatness was never achieved by playing it safe.
"Sometimes, you just have to say, 'What the fuck.' " (Joel-Risky Business)