The way I deal with this is by making deals with myself. If I can get a bit done or a lot done (even better), I'll buy myself something or give myself time to relax. I'm the kind of person where I couldn't care less about anything academic after 8pm, so I try to get things done in the mornings and afternoon. You can try doing things in order from most important to least important and when you're working, don't go on anything that will distract you. Work in a quiet space. That way, you'll focus and find it's easier to work. If you can create a good balance, you'll feel much better too.