Firstly Moomoo, &*( a much needed hug for you.
Life really seems to have ganged up on you lately and Im not surprised you feel so low.
I think you are being a bit hard on yourself (as we all do) about not getting things done. When you feel this way all tasks even the small ones, can be a real struggle to tackle. Even getting motivation to start them is hard. Try to split your day into smaller chunks and see if that can help. Set a small task for the morning - something that does not HAVE to be done and see if you can get it done by the afternoon. If you find that tough then bump it to the afternoon and try again then. Get plenty of rest but try not to overthink things (not easy I know)
If you start to struggle then come online and talk to us. We are always here to try and help if we can. We have all suffered with various types of depression and there will likely be somebody here that can talk to you and make you feel less alone and isolated.
If you look at this anything like I do then the pain aspect is likely making a big impact on all this. I suffer from a chronic illness that has required me to take morphine on and off for 12 years now. Im facing surgery soon to try to get things under control. Its a completely different situation to you I know, but I found my depression would revolve around my physical health a lot and I only really made progress when I learned to separate the two. I now accept the pain as best I can and try to tackle the depression by coming here to talk over my feelings when Im low. I also talk to a councillor which I would advise if you dont already - it can really help.
Once more, &*( for you, and take care.