I've been here before. I did manage to get my PhD. It wasn't easy and I'm so happy the author is getting therapy because I needed it too. But I don't think the underlying cause is procrastination. At least it wasn't for me.
It was perfectionism.
And because I'm a perfectionist, I even managed to absorb the "nobody's perfect" message while still trying to be perfect, and that's part of the problem. For me, the issue arose when "tasks [took] longer than anticipated" and I started to beat myself up for it. But every massive project that's worthwhile has those issues. Time estimating is difficult especially within research. But taking it personally that we couldn't avoid the estimation problem that so many others have failed at, especially since a PhD thesis is typically the first project of it's scale for an individual, is a recipe for disaster.
I got so burnt out by my PhD project that I literally stared at a blank screen for more than a week trying to force myself to do anything. But I managed with my therapist's help to get out of the death spiral. How did I get out of it? Two simple but difficult objectives.
Self forgiveness and accepting it's going to be shit.
I'll explain the acceptance part first despite that I think people should practice forgiveness first. There's a meme I can't find for book authors that shows a cross-stitch with a beautiful image marked "what the reader sees" and then it's flipped to reveal the mess of thread on the back and marked "what the author sees." Everyone is their own worst critic, so consider that massive issues might only be rough edges and the core of the thesis is likely inact and you need to share it with the world.
The second part is self forgiveness. You did not waste the student's time or resources with a slow project. Every project is over budget and behind schedule. And yes, mistakes were made, but everyone makes mistakes, especially on PhD theses. We used to have a joke amongst the other graduate students "you know, I'll get this right on my next PhD." It's literally everyone's first time.
So, know you're not alone. I walked this path as well. Take a true week long break, and when you come back, form a plan to do a one-week long task. Then take two weeks to do that task. Practice self forgiveness on that task itself. Then formulate the most bare-bones plan for the rest of the PhD. One very silly thing that helped break me out of my death spiral was I started to panic that I couldn't even come up with a title for my thesis. So, I did the word vomit approach others mentioned. It wound up being really really bad because it was kinda sing-songy with unintentional rhyming words. I kept it that way for three months as a joke until I did come up with real final title.