I was there too. Oh my gosh, how hard it was for me to push myself to do any work on time.
For me, the solution was to change job. I didn't want to work on a thing that I haven't believe in. It was just uninteresting. Now I can say I work in awesome place, on wonderful project where I learn interesting new stuff every day and feel that I become a better dev every day.