A lot of good answers so far. I approach this issue from a different perspective. Sometimes, work can become so overwhelming and overpowering, telling yourself "At least I have a job" doesn't provide any relief, and looking at long term goals or motivations (including both the paycheck and others) just makes my head spin more.
When I feel like work is getting "tough", my first reaction is to remember I do have a life outside of work, and it deserves attention just as much as my work life does. If my life outside of work gets neglected too much and I am walking/talking/eating/sleeping work, my work will suffer. Stresses from work that are common and expected become epic and hard to overcome when I am like this.
Often, a simple night of just turning off the phone, ordering out and watching a movie so I can recharge the batteries is enough to regain my senses. After doing this, perspective takes over and I realize work is not as bad or as "tough" as I think it is.
Other times, a simple movie night is not enough to get myself motivated again. When this happens, it's always the same story. I make an assessment of how I am using my time outside of work and find I am not using it wisely. Instead of doing things that are fulfilling and constructive/productive, I find myself just going through the motions. The symptoms are the same every time I find myself in this place: Not reading (I have much better perspective when I am reading for enjoyment), not riding the bike (I work indoors and my time outside is valuable), haven't seen family in awhile, my apt. is a mess (this affects me more than I like to admit) so on so forth. I make a conscious decision to correct the problem and like magic, the problems I'm facing at work don't seem like mountains anymore.
In short, how do I stick with it? Balance. Getting in better touch with my life outside of work always leads to me being happier at work.