I find that routine helps quite a bit. Also sitting time limits on what you're working on.
I've read a lot of books on productivity, the one that has stuck with me is called "The 4 Hour Workweek" by Timothy Ferriss. If you haven't read it, read it now.