Simple,
Erase the computer games from your hard disk, then defrag it.
Then break the thesis writing down into smaller more manageable lumps, do one each week.
Bear in mind that writing a thesis is hard, but me and many other people on the wrong planet have done it. For example LabPet recently finished off her thesis (She is now postdocing).
All PhD students have to go through the pain of thesis writing, you should regard it as a time when you will become more intellectually mature. You will learn some things and get some new insights while writing the thesis (I hope).
_________________
Health is a state of physical, mental and social wellbeing and not merely the absence of disease or infirmity

I am not a jigsaw, I am a free man !
Diagnosed under the DSM5 rules with autism spectrum disorder, under DSM4 psychologist said would have been AS (299.80) but I suspect that I am somewhere between 299.80 and 299.00 (Autism) under DSM4.