While querying is massively exciting, it is equally (or more, depending on who you ask) stressful. Lots of writers leave the query trenches feeling wrung out, and to some extent, there's no avoiding that. But there are a few practical things you can do to make your time in the trenches a leeeetle less likely to scar.
#1 - First things first: before you send out a single query, get yourself a brand spanking new email account JUST for querying. The reason for this is that as soon as you hit send, you're going to become obsessed with checking this email account, and you don't want emails from your Aunt Stacey or the latest offers from your local supermarket making that Inbox (1) indicator give you unnecessary heart palpitations.
#2 - Got your email account set up and hooked up to your phone? Great. Now you can stop frantically hitting refresh on your laptop. BUT, make sure you give your query email account its own ringtone. Again, you don't want to start plotting Aunt Stacey's demise simply because her emails SOUND exactly like Amazing Agent X's emails. Also, probably best not to pick something freaky as your query email ringtone (a good friend had the Jaws theme tune as hers) because it's only going to add to your freak-outedness. You might want to avoid choosing one of your favourite songs, too - let's face it, you're going to end up associating it with abject terror.
#3 - Use a system like Query Tracker or your own spreadsheet-type thing to keep track of whom you query, when, and what their expected response time will be. Also make a note of whether 'no response means no' or when you are supposed to politely nudge if you haven't had a response to your query by a certain date. Bring order to chaos, my friend. Order to chaos.
#4 - Make friends/become CPs with writers in other time zones. The reason this is useful is that a) they can let you know if Amazing Agent X tweeted about reading a FABULOUS submission which sounded JUST LIKE YOURS while you were sleeping, and b) if you decide to enter query contests with submission windows at certain times when you're sleeping/working, they can often enter for you! (Yes, I'd advise checking the rules about this for individual contests, but I've seen this done a lot.) You might actually get a little more sleep this way.
BTW, if you're looking for CPs, CP Seek is a great place to find them.
#5 - DON'T send out shotgun queries until/unless you've had positive responses from AGENTS. Your CPs and online critique forums are massively helpful in terms of getting your query and sample chapters ready, but if you send it out to 50 agents right away and THEN realise it's not quite there yet, you've pretty much blown your chances with 50 agents.
I'd suggest sending out 5 or 6 at a time, waiting a couple of weeks, sending out a few more. This way, you'll stagger the response times, and by the time the first 6-week window is up (lots of agents give 6 weeks as a guideline for response times) you'll have some idea of whether the query is working or not. By 'working' I mean either getting a request (of course, and YAY!) or getting a positive rejection - where the agent might praise your writing, but offer the immortal words "it's just not for me". Then you can either send out more queries, or revise your query/MS if you need to.