My friend please be kind to yourself. If you don’t mind me saying, I think you’re being a little hard on yourself. Take it from someone who has been there, your first priority is your physical, emotional and mental health. I am an English Teacher in a rough High School and 2 years ago I decided, I wanted to follow my dream of coding. Like you, I worked super hard (8+10 hour days) and I managed to squeeze an hour or 2 of coding a day thinking that it was helping. Plus I had a close family member who was sick at the time who needed a lot of care so I had a lot on my plate. Like you I went from enjoying coding to treating it like another chore.
With all the stress I was putting on my body, my health crashed at the beginning of last year. I had really scary symptoms and I couldn’t work for months. The Doctor said that I was ‘burned out’ and after 14+ months of changing my diet, lessening my workload and simplifying my life, only now am I getting to normal productive levels.
Ironically, the more I pushed myself in my life, the less productive I became. After 4 months of non-work & non-coding, I realised how punishing my routine was. The kinder and gentler I was on myself, the more the joy and interest came into my coding and life.
I am in the same boat as you but I now tell myself ‘life is a marathon, not a sprint.’ Don’t give up - perhaps wake up 30 minutes earlier and do a little coding in the morning - it all adds up! Also take time to unwind and refresh yourself - although this is counter-intuitive, you will feel better and you will absorb a lot more. You will get there in the end!
I wish you all the very best my friend and I hope that my advise is helpful.