Pretty much everyone suffers with this so I think it's great that you're already trying to work out some techniques to get over it. If you can, I would set yourself a set number of hours a day to work before you start your PhD, so that when you do you will be used to having a routine. Also: ban internet! No internet browsing at all until you've finished your work. This was recommended to me and it helps enormously.
Hope this helps.