In parallel with the direct suggestions, address the stress itself. Prolonged stress limits brain function and therefore your ability to turn the situation around.
Do exercise coupled with controlled breathing, specifically with prolonged exhales, which tells our nervous system that there is no fight here. Do a tiny walk outside every two hours of coding, and consider yoga. Personally I also signed up for Blue Apron or similar mailed recipe kits because I found those instructions to be a relaxing level of activity, better than TV but still winding down, and there are those healthy diet benefits. I also rigged a sit / stand workstation with email on the low monitor and code on the high ones so switching position just happens.