This is a good post on the Guide to Literary Agents Blog: How Do We Know When It's Time to Quite Being a Writer?"
With all the ups and downs of the writing life, it can be tempting to quit. J. M. Tohline offers the following words of wisdom:
I have written to write. I have written because I have no choice but to write. If I ever try to quit, I'll just come right back.
In truth, my path has probably not been so different from the one you are traveling yourself, or (you better start preparing now) the one you will travel yourself. And unless you are a masterpiece of mental toughness and emotional unassailability, you will sometimes find yourself asking that dark question: Is it time to just plain quit?
The answer, of course, is simple: Can you quit? Chances are, you probably cannot. So keep writing, Dear Writer – because that is what you are. Whether or not you have a novel in bookstores. Whether or not the whole world has read your writing. Whether or not anything of yours is ever published, as long as you live, you are still a writer. It is part of who you are. Keep writing. It is never time to quit.