As someone who studies and works, time management is a big thing for me. One thing I would recommend is making a daily schedule. Try to plan at least a month ahead, making sure to leave at least 2-4 hours every day for anything you want to do or for unexpected things. The schedule can maybe help you with creating a habit and routine.
Here's an example of my daily schedule when I'm studying (Mondays - Fridays):
6 am - Wake up and get ready for classes (Eat, shower etc.)
7am - Check emails (For Tapas)
8 am - Studying and Classes
12 pm - Lunch Break
1 pm - Freelance Work
3 pm - Free time (Writing / Editing)
5 pm - Get ready for work (Eat dinner)
6pm - Work
12 pm - Bed
I do try to stick to this schedule but it's mostly a guideline for me. Right now of course I'm on a break so my schedule is a little more free. Also I have two schedules, one for the weekend and one for weekdays. Using a calendar / daily planner can also help.
Another thing you can do to not lose track of time, is using a stop watch / time countdown. So, if you plan to write 2 hours everyday before work, time that and once the timer ends you don't touch your writing. It helps me with maximizing my time and creating a routine for my writing.
Anyway, I hope this helps you 