In his Father's Day entry, Neil Gaiman passes along Heinlein's Five Rules (with Sawyer's sixth addendum) to an aspiring writer:
Dear Neil, I am sure you have probably answered this question before and are probably, therefore, very sick of it. But, I still must ask. I am an aspiring writer and am wondering how you stayed motivated during times of great failure. I understand what many writers mean when they say the love of the art drives them. What I am concerned with is how to deal with the inevitable denial of a piece of literature that you have invested everything in?
Write the next thing.
Maybe the world will catch up with your brilliance eventually, or maybe you'll look back in ten years and decide it wasn't that great really after all. Doesn't really matter. Times of great failure or times of great success, the problem is the same (how do you keep going?) and the solution is the same: You write the next thing.