Sticking to your planned foods when you´re at home and doing something that´s not the most exciting activity in the world is HARD. Especially if what you´re doing is stressing you out a bit as well. Maybe you can plan regular breaks and small rewards for yourself after every little chunk of work you get done to make it easier? Nuts are very high-calorie but at least you got those calories from something healthy that´ll feed your brain. Silver lining and all.