I alternate my work days:
On even days I ask "What can I do today that advances my work as much as possible?" and work long hours with little breaks and no frivolous web browsing, etc.
On odd days I ask "What seems like the most interesting and anxiety reducing things I can do?" and allow any music and frivolous web browsing I want.
Some of the benefits I find with this approach are (1) it weens you off of habitual web browsing, so even when you allow web browsing it's moderate and (2) I find even on my "off" days I end up usually being productive, though at a lower stress level, since luckily much of my work is genuinely interesting.