When you feel like a failure
Go for a run/ go to the gym
Focus on work/complete your daily tasks
Visualize your life in 6 months from now. How you'll look. The money you'll spend. The lifestyle you'll have.
This will give you the extra motivation you need.
Simple.