Hi,
I've been working from home since 15 years...i've had my ups and downs, but here are the main things keeping me motivated:
1. Sport, working from home in front of the computer will make you depressive and anxious, so its important that you do sports every day (or at least 3-5 times / week). jogging, gym, walking (at least 1 hour), whatever you like
2. Have a shedule, i work from 9am to 4-5pm (with 1-2 hours break), once your shedule is done, you dont sit at the computer, you go out, read a book, meet with friends, invest time in small projects
3. Buy a big board and put it on the wall in front of your desk, write some short time and long time goals
4. If you can rent office space (i was not able to do this, but i will probably do this in the future)
5. Weekend is relax time, no work, go out, nature, meet with friends, whatever you do dont sit in front of the computer
Hope this helps!