yeah I have the same problem
to fix it, as long as I didn't have work that I needed the computer for, I wouldn't even turn my computer on. I would do the work in a room without a TV, though I did allow myself a radio.
If I needed the computer for work, then I would not allow myself to open my web browser (it turned out that 99% of my procrastination was simply due to the infinite number of time-wasters available on the internet, so I didn't open the browser to avoid the temptation).
If I needed the web-browser to do work, I did not open new tabs or new windows. The only thing on the screen would by what I needed for the work I was doing. Even if I was going to procrastinate by spacing out, that never lasted as long as the web-surfing tangents I would go on.
Eventually you get so bored that doing the work is actually your best option. After a few days of doing this, the spacing out periods minimized and I actually became much more efficient.
A few days later, I reverted right back to my old self