Writing can be a discouraging business, full of rejection. We get rejection letters, we get criticism of our writing in workshops and from editors, and, hopefully, once we're published there's no end to the criticism we must weather in reviews and from readers who feel they must tell you all about their reading experience. We're often hard on ourselves, rejecting our own writing as we edit it (or as we write it!). There are few other occupations (perhaps acting) where we risk so much so publicly and open ourselves up to so much possible criticism and rejection. So, it takes a brave heart to be a writer.
I'd like to say that over time it gets easier, and it does to an extent. As I've built confidence, through mastery, I find I'm less likely to be bowled over by rejection or a harsh review and much more likely to laugh it off (keeping in mind that I may have something to learn from each criticism). Nevertheless, it still hurts.
These feelings are hard, but I wonder if they aren't also necessary. We become bonded to our ideas, to our scenes and material as we have written them. It's very hard to see that stuff differently. If you have experienced a breakup, then you know there is a period of time where there is great anger and hurt, and great conflict between you and your ex. But then those feelings dissolve as we become accustomed to a new reality. That period of anger and hurt is necessary to the process of separating. It's necessary to break that bond, in the same way that falling in love is necessary to create the bond. We fall in love with our writing as we write it and rewrite it; we bond with it. To change it is an act of separation. No wonder then that we have these feelings of anger and hurt. They may be necessary to the process of seeing the writing anew, to looking at it with a different perspective. The anger and hurt fades and then we see the writing with new eyes, just as we see our old love with new eyes once the separation is complete. It's an act of distancing.
If there's a single piece of advice I can offer when it comes to weathering rejection and critique, it's to stay focused on the process. Write because you love to write. Don't worry about the end product or getting on the bestseller list. Don't worry about what other people think (except in the effort to make your writing better!). Write because you're passionate. Write because you can't do anything else. Write because at the end of a writing day you feel the deep satisfaction that comes with mastery. Write to reach that meditative state where you lose hours and lose your sense of self. Whatever the reasons you write, write for yourself, not for anyone else, and you'll weather these storms.