You work on a book for over a year. Not just pounding it out over the month of November and putting some editing time on it in December, but really working on it. Conceiving, plotting, writing, editing, getting feedback, etc. Then comes the fun part. You get to boil it all down into a query letter of 250 words or so and send it to agents in your first step towards publishing your work.
And the form rejections start coming.
Step 1: Take a deep breath and remember that agents have to be picky. They probably read a hundred queries a day and have to pick out books that sound polished and publishable and fit what they're looking to sell.
Step 2: Take another look at your query letter. After the first few rejections with a query letter that I thought was good, I got an idea for rewriting it in a way that sounded much better. Even my query letter reviewers weren't able to make my original one sound better because they were more concentrated on grammar and making it sound just a bit better. It took me, the writer, to do the important editing to make it better represent the book, its tone, and its content. All my reviewers agreed that the new one was vastly superior to the original. Moral: If you think your query letter is OK, then that's what it probably is. You need better than that. Start with Query Shark for excellent lessons on good and bad queries, then go from there.
Step 3: Prepare for the inevitable. The rejections will come. That's all that might come. For most writers that's all that ever come. At least nowadays, there are alternatives. You could self-publish if you really have the drive to sell your book yourself. If it comes down to it, there's always posting a PDF of your book on your website and seeing if it catches on virally.
Rejection still sucks. No two ways about it. But, if you have never experienced rejection at this point in your life, then you either haven't lived very long or you lead a charmed life - time to join the real world. For the rest of us, good luck and keep fighting.