Increase the gaps between days of low productivity. Fill those gaps with constructive days. That way, you won’t berate yourself for a bad day. Instead, you’ll reflect on where you went wrong, and correct it the next time around.
If you do slip back, ask yourself,"How can I make the most of the next hour?"