We've all heard the stories about famous authors collecting hundreds of rejection letters before they ever saw their name in print. It helps to know others have suffered. It encourages us to keep going, because they did, and look where they are now.
However, I think there's a danger in viewing rejection letters as some kind of 'badge of honor'.
When trying to get published, rejection is a necessary, and painful, part of the process, but submitting your work to an agent/editor doesn't make you a writer (after all, anyone with an envelope and a stamp can do that), any more than getting turned down by the army would make you a soldier.
Sure you need a thick skin, and you have to get up one more time than you're knocked down, but there's more to it than that. There's a huge difference between a 'writer' and a ' collector of rejection letters'. It goes without saying that the work has to be good to start with, but before you even think of sending it off, you need to re-read, revise, rewrite, repeat until it's the best you can make it.
When that's done (and in the case of short stories BEFORE that's done), you need to research the market. One of editors' top peeves is that people submit work that clearly doesn't belong in their magazine.
If your story/manuscript gets rejected out hand, you need to stop and ask yourself why? Otherwise there's a good chance the same thing will happen when you send it out next time. Maybe you feel it can't be improved. You may be right, but it doesn't hurt to check. There are plenty of reasons why your work didn't get accepted which have nothing to do with quality or your target publication (right story/wrong time, too similar to a previous one etc.).
The bottom line though, is that if you believe in your work, and feel the agent/editor you queried was the right one, then rejection should hurt, otherwise why send it out in the first place?
I'm not saying you shouldn't be proud of your 'Dear Sir/Madam, not for us...' collection, I'm just saying it's the acceptance letters that prove you're a writer.