If you normally, overeat while
surfing the internet, try to not spend so much time
surfing, or find some other behavior besides eating. Some tend to overeat while watching TV, etc.
If you're surfing the internet and get the urge to eat, get up and do something else, like sweep the floor, do some laundry, go for a walk; anything to take your mind off eating.