Yup, it's all part of the game and unless you're that one in a million, you'll have to learn to deal with rejection. I've handled it pretty well over the years.
I've progressed from my first book, which was NOT ready to be published, to my fourth one, which IS ready for publication. My second book, Sword Across Time, was published by a small press called Treble Heart Books, but with my next two manuscripts, I'm holding out for a larger publisher. This stubborness on my part also means more rejections.
The upside of the whole process is this: My rejections have graduated from the words Not interested sprawled across the top of my query to Dear Author form letters, then on to what I consider gold--personally addressed letters signed by the editor or agent I actually mailed the query to and offerings of advice and reasons why they rejected my work. These words of advice are taken to heart and considered seriously by me before I send my work out again. I don't agree with everything said, but I don't discard it outright either. It's kind of like getting free critiques by experts in the field. By being as objective as possible (hard to do) about my writing, I can improve it by those very same rejections that make my throat close and hands shake.
A rejection, yes, but done in a way that lets me know my work has improved to the point where a little bit of respect is shown. What a nice feeling. What an affirmation. Yes, another rejection, but I'm on the uphill climb and I'm going to make it to the top in spite of all obstacles.
That's all for today. I haven't written much over the last 10 days. Mainly due to one of those rejections that brought me down low. Hey, I didn't say they didn't affect me, just that I go on in spite of them. :-) Sometimes it takes a little longer than other times.