I've experienced that same thing (who on HN hasn't? ;). Tips and tricks to cut down on info-addiction can help a bit.
But the only thing that really works for me is when I focus on a positive goal I want to achieve, instead of spending energy on avoiding the bad habits.
Now, I'm focused on building my business. It doesn't mean I have stopped getting lots of shiny new ideas. But now I don't have to fight with myself. I just don't have the time or energy for these new ideas. Too focused on the current idea.