I used to be very strict about separating work and home, and it helped for a long time. However, there are times where you must work at home, and I had the same problem as you for a long time. Here's some advice that helped me:
1. Consistent sleep schedule. Try to get the same amount each night, and roughly at the same time. I still struggle with this at times, but it really is important.
2. Eat right. Make your own food, and make it healthy. If you don't know how, learn. Allrecipes.com is a great site for recipes, and you can see the estimated nutritional information for a recipe. Also, make sure you get plenty of protein and healthy fats. Don't just eat carbohydrates. Fish oil supplements are a good idea. Also, more frequent, smaller meals are better.
3. Exercise. At least a few times a week, for an hour or so each time, get some strenuous activity in. Everyone is different here. I prefer to lift weights, some people like running. Find something you enjoy, turn your brain off, and let your body do the work.
4. Schedule your days. I use google calendar and plan out my day by the hour. Be sure to schedule some down time as well.
5. If you can, turn off your computer. Don't just shut it or go to another room. Unless you NEED it for your studies, turn it off and ignore it while you're studying, or you'll be sucked into the web.
6. Don't rationalize. Just because you did X doesn't mean you deserve Y. Do what you have to do, and don't make excuses for not doing it. If you don't enjoy what you're doing, either stop doing it, or make yourself learn to love it. As a graduate student, this has helped me unbelievably. I learned to enjoy the challenge of doing things that I wouldn't normally enjoy.
7. Breathing exercises. Read up on this, but calming breathing exercises, meditation, etc...this all works. Make a study/work ritual. Sit down before you work, and close your eyes. Breathe in slow and deliberately, hold for a second or two, then release slowly. Focus on the breathing, or your heart beat, or something constant. Take a few moments and get your mind right, then begin working.
8. Take breaks. Every half hour or hour, take a minute or two and stretch. Stand up and walk.
9. Drink a lot of water. Water, not soda, not juice. Your body needs it, your brain needs it, and it will help provide you with the breaks for #8 to either refill your cup or go to the bathroom.
10. Easy on the caffeine, unless you can't focus. If caffeine helps you focus, go ahead and have some, but go easy on it. If you notice that without it you CAN'T focus, you *MAY* have some attention deficit issues, or an addiction. If you do have it, make sure you drink MORE water.
11. If you can't help but procrastinate, set yourself time to do so. This is actually what I'm doing right now. I know that I won't get to work until I've read the news, etc. Schedule this. You know yourself better than anyone. Be honest with yourself and what you can/are able/are willing to do.
12. Make time for social interaction. Go have a beer with some friends. Catch a movie. Go play some sport. Schedule some time off a couple times a week and make sure you don't skip it. And when you're out, enjoy being out. Don't fret about what you're not doing. Time off can help you greatly with your time back on.
13. Remove distractions. This is just like the internet. Remove the distraction, or make it difficult to use. Unplug your TV if you have to. If accessing a distraction is made harder, you'll think twice before using it.
I'm sure there's more, but I'm done with my procrastinating for the day, and I'm going to get some work done. I hope that this advice is helpful for you.