you might have trauma (little t trauma), which feels weird to call trauma because its not obvious trauma (death, car accident, abuse etc) but still affects you a lot and your feelings are still just as valid and they are there and real.
Try to allocate a long time, like 2 hours to focus on something that you know you have to do. Observe how it feels physically, in your body.
For me, my throat tightens up and my chest gets tight and I feel like crying.
So I procrastinated for years to avoid feeling the awful physical sensations. I still do, really. They haven't gone away for me just yet.
First step is awareness, next is expecting the feeling, discovering what triggers it, making elaborate plans and tackling harder tasks in bite sized pieces. Force yourself to try and improve, because you have to, and soldier through the feelings like you're on the start of a long battle, or a long journey of self growth.
Relate as well and agree with this approach. I'm still working through it. Even right now, as I watch the minutes countdown to the hour when I will begin again. I found the works of Dr Gabor Mate to be quite helpful (talks available on YouTube and I found a lot of value in his book When the Body Says No, especially the second half which I think you could just pick up and read). He primarily focuses on drug addiction but in doing so dives deeply into dealing with trauma. Another source that has been helpful to me is Oprah, her Super Soul Sunday podcast is great (browse the titles and pick any that seem interesting to you). And of course I wholly second the recommendations for therapy, understanding that one's perspective may not be the full picture can be life changing.
My “laziness” was caused by little t trauma from childhood. I would stare at my editor and just start to cry at how I couldn’t bring myself to write code. I’m still working through it, but what has helped for me is taking space away from work, therapy, and the book The Road Less Traveled by Scott Peck. Good luck.