What helps me personally is having a notepad where I jolt down TODO items, to the most atomic level if possible. To give an idea what's on it here now:
- probe for activity on the I2C bus
- find the SIGCHLD problem
- remove rectangle in the logo on web interface
- follow up to a customer on his RFI
I.e. tiny bits of work that do not present much challenge separately, yet are actual, necessary things to be done. No deadlines, priorities, long descriptions, etc. No grand items like "add feature X" or "do complete test coverage". They are easy enough that I can complete at least one (but usually a bunch) in the day, and strike it out. Each time you do that, there is a modest tingle of gratification, so it helps to maintain working mood. Also, looking back at the list of completed items is reassuring.