The life hygiene issues of exercise, sunshine, good sleep, social support are all helpful in getting stuff done.
Beyond that, don't rely exclusively on your working memory for keeping track of all of the things you need to do. You are already taxing that with learning, and offloading everything you can to external aids is helpful (todo lists, experimental journals, daily 3 page mind-dump journaling). A regular review cycle of what you have written can give you a sense of accomplishment, which can be lacking in multi-year projects with few intermediate wins. Count volume of output as a goal, and use beeminder or something similar to remind you to track it, and show you what you have accomplished (pages written, commits made, hours worked...).
Previous thread
If it's worth saying, but not worth its own post (even in Discussion), then it goes here.
Notes for future OT posters:
1. Please add the 'open_thread' tag.
2. Check if there is an active Open Thread before posting a new one.
3. Open Threads should be posted in Discussion, and not Main.
4. Open Threads should start on Monday, and end on Sunday.