I'm experiencing this right now. My productivity at work is dropping to nothing. Looking at the code base is getting harder and harder. Unfortunately, I am under a mountain of debt and am responsible for 3 other humans, so trying something new is not an option. Note to young programmers: please manage your finances wisely and not fall victim to the "they have X, so why can't I" syndrome. There aren't too many fields where you can make the kind of money we do, so don't trap yourself financially--it closes too many doors.
I've been there. Just know that this too will end. Take some quiet time out and use your analytical brain to think outside the box. I did that and found a way to manage my debt so that I didn't feel crushed by it (closed all credit cards, and took a loan on my 401k - paid it all off in 3 years). Started working remotely part-time and took the occasional day off. Little things help.
Agreed. I have a big enough loan (not absolutely huge, but big enough to be serious) right now which locks me into my current job. Do not get into debt unless you absolutely have to people, unless you enjoy stress + being forced to stay in situations you don't want to. It's never worth it.