Well...
Just like your body tells you when you are training too much (though most people don't listen)...I think the mind works the same.
Instead of slugging through it, take a break for a few hours and do something that you enjoy. When you come back to finish the work, your mind will probably be in a better position to finish up the work.