Bad and negative days will come. You’ll be unproductive, frustrated, nothing will go your way, and you’ll find yourself procrastinating more than usual.
You can plan everything perfectly to never get into such a position, but life will still come in the way. It’s unavoidable, perfectly normal and everyone has to deal with it eventually.
When it happens, try to keep in mind that it’s only temporary and that you can take action to improve your situation.
Rest more, get more sleep, eat healthier, go for a walk or a run, meditate, do whatever helps. And don’t worry about your productive output. It can wait.
You and your own needs should always come first. Only when you’re at your best, you can contribute fruitfully and productively.