If you're tempted to 'treat' yourself, do it after your language learning practice, not before. Use it as a reward. For example, if you're compelled to watch silly youtube videos or play a game of angry birds, do it afterwards. It's very eays to convince yourself 'just one more video', 'just one more level', etc. Don't let yourself fall into this trap because it tends to spiral. Keep the rewards for after you've completed 20 or 30 minutes of learning.