Learn to take a break from your tasks.
The harder and more focused you are in your work, the breaks should be more frequent.
Just like a sprinter who can sprint for a certain time before tiring, your mind tires faster if you are engaged in tasks that requires high concentration.
Taking a timely break will also give you a boost of energy and is a great anti-stress mechanism.
So, go ahead and have a little break when you need it.