You are right in forcing yourself to work to a schedule, it makes being productive when stuck or working from home much more bearable.
Managing your space is also significant one, make sure that where you work, sleep and relax are as separate as possible. This way, your body will know what it should be doing, depending on where you are
I highly recommend watching this CGPGrey video, he explains it incredibly well.
https://www.youtube.com/watch?v=snAhsXyO3Ck