I've felt this when starting on challenging programming tasks. "I WILL DO THIS" usually ends up with procrastination, or no real solutions coming to mind. Gently nudging my mind into wondering about the problem, poking it, thinking of ways to do it, thinking of ways to get out of doing it, then finally a tipping point is reached and I hold on for the motivational ride. It helps when you work for a company tolerant of this creative cycle, where motivation for a particular problem or project may come from nowhere.