To encourage yourself to do some massive, granular task:
Upon completion of each granule, give yourself a reward with some probability.
A reward is a small piece of food or a sip of a drink, etc.
Never eat or drink anything except as a reward for working on the task.
This really works extremely well for me; I have been doing this for about 2 months, at first only with anki reviews and more recently for several other things. The feeling is very similar to addictions like video games or entertaining websites; I often think "I should probably go do X, but let me instead do just one more anki card" and a half-hour later I realize I still haven't done X.
More things:
Make the rewards unlikely and small so that you stay constantly hungry. Bonus: caloric restriction.
Create a timed reminder, say half-hourly, to do just a few granules of the task. This encourages episodes of the "just one more" effect.
Put reinforcers within arm's reach, both temporally (make granules easy and quick, so that hunger feels like an urge to do the task rather than an urge to cheat the system) and spacially (so that you are constantly reminded of your hunger and tempted to do the task).
I repeat: this works extremely well for me and I strongly encourage other people to try it. More details here.
Here is a graph showing the number of Anki reviews I've done every month for the past year, as an example of the results this method can produce.

This is transformative. Thank you.
Thus spake Eliezer:
It seems that many here might have outlandish ideas for ways of improving our lives. For instance, a recent post advocated installing really bright lights as a way to boost alertness and productivity. We should not adopt such hacks into our dogma until we're pretty sure they work; however, one way of knowing whether a crazy idea works is to try implementing it, and you may have more ideas than you're planning to implement.
So: please post all such lifehack ideas! Even if you haven't tried them, even if they seem unlikely to work. Post them separately, unless some other way would be more appropriate. If you've tried some idea and it hasn't worked, it would be useful to post that too.