The world is a mess, and yet it still wants us to produce at top capacity. That's just not always possible, of course. Whether you're living with an ongoing condition or coping with a situational upset, your mental health can derail your best intentions like no other. Capitalism means you have to push through — and whatever your thoughts on that, you do have some options when you feel like you're overwhelmed.
Jenny J. Chen has written an excellent piece on how and why productivity hacks aren't cut out for bad mental health days. PTSD, depression, anxiety, OCD: All these and more are valid hardships. First and foremost, you deserve supportive structures at work, and in fact, one of the greatest productivity tools is a company culture of kindness. (This also applies to anyone who works from home, especially in the form of maintaining boundaries.) Chen emphasizes another angle: Look for the smallest possible task within your to-do list. Focusing on achievable steps and bite-sized blocks of time can help stave off panic and numbness.
There are other tools at hand too. Mindfulness and exercise are cliché examples, but they can help, even in small doses. Another little act with an outsized effect is keeping flowers in your home or office. If treating yourself kindly doesn't fend off imposter syndrome or keep your bad day from following you home, you might need a structural change more than anything. Cut your ties with toxic workplaces. Even if it takes time to recover, giving yourself a better environment will help with virtually everything else.