I spend a lot of time on working on queries. I actually enjoy it, as it allows me to reflect on my work beyond redrafts and the original creative process, to come up with better approaches to my synopses, and sometimes even come up with ideas for future drafts. I see it as an opportunity to improve my writing, overall ... and I can only hope that those who pass on any given project of mine might see my potential and remember my name, just the same.
Rejection doesn't bother me anymore. We all experience it, no matter who we are. I've been receiving rejection letters for many years, now, and I think I've learned a lot in the process. Some are form letters, but many are very positive, offering me tips, helpful critique, and encouraging me on. Other than the few dozen I lost in a move eight years ago, I still have every one of them. They are badges of honor. They have thickened my skin, given me humility, and taught me just how much I want this.
I think writers should spend a good amount of time on query writing; to perfect the query is to perfect the work.