Strategies to strengthen self-discipline as a PhD student
I recently finished High School and I'm about to start University. I had a similar problem when studying for my final exams. This really helped me so take it or leave it, here's what helped for me:

1) Don't commit to doing huge mountains of work, you will only find procrastinating easier. Only plan to do a small bit and if you don't get into the rhythm of things then that's all you have to do.

2) Go for a jog/run. I would go at a regular pace until I really wanted to stop, then I would go just a bit more, to the post ahead, then to the next post and so on, forcing myself to keep going. Then, with the same attitude in mind, I would study just doing one more paragraph, and the next, and so on. Little Victories.

3) Remember: Every time you fail or feel like stopping, somebody else just gave up and each time you keep on trying, you do better and better than the people who gave up when you didn't.

I hope this helps.