2. Take a day off. No guilt, no thinking about what you should be doing. Don’t schedule anything for that day. I see too many people take “mental health” days and then panic to try to get all their appointments set up for that day.
3. Start forcing yourself to do little things. As someone else mentioned, force yourself into 5 minutes or just reading code. Force yourself to fully grok someone else’s pull request. I went an entire year forcing myself to push code for review every single workday because otherwise I felt like you’re describing yourself. It was brutal some days (“rewrite X class with streams api” was a common change), but it both kept me going and got me some respect from my colleagues.