Lifehacker offers a simple but solid solution to making sure we don't repeat mistakes and are always improving our lives.
Keep a notebook and record what has and and hasn't worked for you, over time creating a "Personal Handbook."
Study your behavior, keep track of what helps you out, and write it all down in a personal handbook that you can reference in the future.
Consider a bad day from the past and the problems that came up. Motivation was probably an issue. Did sleep help? Did you feel better after eating something? Perhaps the solution was more unique than that. If you're unmotivated to work, consider it an opportunity to do something else and take note of the effects. It may do nothing at all, but eventually you'll come across an answer. When you do, make a note in your handbook so next time you feel that way, you can look up possible solutions and give them a try.