Be gentle with yourself. Try and control the things you can (food, sleep, physical comfort). Try and do your work ahead, in small chunks, so you don’t have deadline pressure coinciding with a bad day. The best you can do on any given day is still the best you can do, and that’s all anyone can ask.