My friend Stephanie Rosenfeld (also a writer--her short story collection WHAT ABOUT THE LOVE PART is one of my favorites) inspired me to keep a Writer's Journal. Here's the idea. After you finish writing, take ten minutes to note in your journal what kind of experience you had that day. How much did you write? What problems did you solve? What problems do you have to solve still? And most important, how do you feel about your work?
Later, when you've finished (and even published!) your manuscript, you can look back at the journal and realize that you were able to power through the tough times. You'll have that most useful of tools--perspective.