I'm afraid you'll have to treat it as an addiction. I'm not saying you are or to which degree you are, but the mechanisms are the same. Now everyone has different methods to deal with such, some might work others might not. This goes as far as searching for professional help if it gets worse. Grand's advice for physical activities already goes in that direction, as sports is a common method to treat mental issues, as e.g. depression. Another method could be to conceive a daily schedule which also contains video games, but on an hourly basis and you'll have to follow it. This - as probably many tricks - requires a decent amount of self discipline, which is usually the most difficult part. Here comes medical consultations into play, because an addiction should be treated professionally. Again, I'm not claiming you are addicted, especially not at which stage. But you should be careful, because your behaviors might result in one. So far any tips which will work heavily depend on circumstances and personal properties we cannot know and which normally differ a lot among individuals. Another yet unmentioned method is to consider your studies as a kind of video game. I know, the graphics are really poor, but quests and mysteries are much better and always leading to unknown grounds and levels!