I don't think you need to feel bad about your career choice just because the internet is more interesting. If I had a job that was more interesting than the Internet, I'd have it *made*.
The problem here is that math is interesting, but it's a long, sustained kind of interest. If you can develop a taste for that kind of interest, you might find it easier to avoid distractions.
www.dontbreakthechain.com is a good tool to avoid distractions. The way it works is that you decide on a goal and mark every day that you achieve that goal. Eventually, you'll get a chain of days where you achieved your goal, and you'll be motivated not to break it.
Often, the best way to go about something like this is to start with easy goals, and then gradually progress to harder ones. For example, make it your goal to go 10 minutes distraction free each day. (It'll probably work best if you make these at the the same time ever day, for example, 6:00 to 6:10. Also, you might to rigorously define what counts as a "distraction" beforehand, so you won't try and weasel out.) Once you've done that for a week straight, you could upgrade to 20 minutes.
Some other tips:
- Be honest about your recording, or the tool might be rendered forever useless to you.
- Make dontbreakthechain.com your home page so you'll be reminded of your goal, and so you'll remember to record each day that you accomplish it.