I don't think there is a writer who has ever escaped criticism. It's part of the packaged deal that comes with wanting to have people read what you write. Yes, some comments can be downright hurtful and hateful, and writers typically do one of three things after getting a negative review. They stop writing, they freeze up with writer's block until they can get some distance and perspective on the review, or they keep writing.
First of all, quitting shouldn't be an option, not if this is something you want to do. That said, it may take a lot of work to make the dream happen. It doesn't mean it won't happen. It all depends on how hard you are willing to push yourself to get there. The longer I write, the more I realize that a writing career isn't built on talent so much as it is tenacity. We all make mistakes. The trick is to learn from those mistakes. And even when you do learn, you have to remember that you won't make everyone happy. If you look at the authors who have very successful careers, you will find that they didn't please everyone either. The best you can do is write a book that is solid and worthy of praise and then choose to accept that it will not always measure up to other people's standards. Accepting this ahead of time will save you lots of head-banging.
Some writers freeze when rejection hits. I've had this happen. You can call the aftermath writer's block or self-doubt, or whatever you want. The simple fact of the matter is that you have to work through all the negative to find the positive. It may not be easy, but I don't know of much that is worth a lot that is easy. Besides, you can get criticized for just standing around if you happen to stand in the wrong place at the wrong time. I agree with Mahatma Gandhi when he said "You may never know what results come of your action, but if you do nothing there will be no result."
Some writers, usually the experienced ones, just keep writing, knowing that both rejection and praise will come. The trick is to keep both of them in perspective. Rejection is one person's opinion. So is praise. Neither of them affect the opinion that should matter--the voice inside that tells you to always be true to the story and always write it the best you can.
When it comes right down to it, there is a choice in how you accept what people say about your craft. No, the choice isn't about whether or not a person can say what he or she wants to about your book. It's not even a matter of if they should say it. The only thing you control about criticism is how you handle it. You can't stop it and you can't rationalize it away. All you can do is accept your role in this is to write and to enjoy that writing. Isn't that the whole purpose?