Instead of having the attitude of "let's see how much I can accomplish today", set realistic expectations beforehand for what you plan to get done during a single day.
This allows you to
Planning a realistic amount of work each day means setting a realistic/pessimistic daily plannable time and sticking to it when planning a single day.