Writing is a solitary profession. Yes, you talk to other writers and work with editors, but essentially you're the one who has to put your butt in the chair and do the work.
You spend weeks or months on a project, pouring your heart and soul into it, revising it and polishing it, until it's ready to be sent to a publisher. Then the waiting begins.
For any new writer, the wait can be agonizing. Will they like it? Will they contract it? As any published author knows, the answer is NO most of the time.
Does that mean if you already have a publisher that you have an "in", that you will be accepted automatically? Only in your dreams. Published authors get manuscripts rejected all the time, sometimes even by their own publishers.
No matter if you've never been published, or if you've published a dozen or more books, it hurts. A writer puts everything in their work--blood, sweat, tears and emotions--leaving nothing on the table. To be told that it's not good enough hurts.
But what matters is the writing. If you hope to make it in this business, all you can do is pick yourself back up, sit in front of your computer and write.
After all, what's the alternative--not writing?
That's not acceptable. Not to a writer. We write because we have to, because the voices and stories in our head drive us too.
Rejection is par for the course in this business. We've all had our fair share and then some. The trick is to just pick yourself up and keep writing. There is always another story to be written and another publisher to try.