There is a famous quote by Reinhold Niebuhr that I try and live by daily. I'm sure you've heard it before: “God, grant me the serenity to accept the things I cannot change, the courage to change the things I can, and the wisdom to know the difference.”
The agent search/publishing process falls neatly into the category of things we cannot change, nor have any real control over. Yes, we can tweak our query, revise our story, select who to approach, but the rest is all really up to the universe/fate/whatever. We can light candles, say prayers, do rain dances, and all sorts of other craziness (and, really, it probably can't hurt,) but at the end of the day, we can only do so much, and then it's simply time to let go.
Letting go of your work is probably the hardest challenge of all in the writing process. It's akin to the feeling you get in your gut as a parent when your child grows up and goes off to college or gets married and starts his/her own life. What happens to them from that point forward is out of your hands. So it is with your book. When you've done all you can do, and that book is in the hands of that agent, or that agent has sent that book out on submission, all you can do is wait. Nudging and pushing to find out the answer will more likely get you a no than a yes, and if it is meant to be, it WILL happen. And if it's not . . . it won't. It's that simple. Hard as it is to embrace that concept, it is essential in order to move forward as a writer. If you continue to focus solely on the project you are querying or are on submission with, you will never get to the task of writing your next book. Chances are, as your self-confidence naturally wavers and ebbs with the waiting and inevitable rejections that come, you will be less focused and less inclined to press ahead with new ideas.
The best thing you can do is to accept that whatever happens will happen, and start writing. Lose yourself in a new work, new characters, new world building. Use this time to catch up on reading and take workshops to hone your craft and meet people. These are all productive distractions, and ultimately, when that agent call comes, or that publisher wants to buy your book, you can let them know you are busy at work writing something else, or even better, have another completed work to share.
Checking your email 100 times a day and waiting by the phone will only make you crazy and unproductive. Accept the process, accept what you can do and know you've done all you can, and then let go. That's when stuff happens anyway, right? Just when we've given up, put it aside, and moved forward. Just as a watched pot never boils, it is no different with this process.