I maintain a list of tasks all of which take no longer than 20 minutes. Time box the task and once it is complete, cross it off so you get sense of achievement throughout the day. In between tasks do something unproductive like go to the loo, make coffee, feed the cat etc. but don't break a productive task to do something unproductive.
If you have a large complex task break it into smaller 20-minute chunks. If your work involves emails, social media etc. time box those activities as well so you avoid getting distracted.
Set yourself a goal of 10 tasks per day, this is just over 3-hours of productive work. Gradually increase the task target.
In terms of wider motivation - mine is money. Set yourself a weekly/monthly/annual income target and work towards it.