Nobody can work forever. Even if your willpower is strong enough to push you beyond ordinary limits, the quality of your work will gradually decrease until you become ineffective. Once you have pushed yourself too far beyond your limits, you will burn out, resulting in a prolonged period of low or no capacity for work. Burnout can also reduce your desire to do that same type of work in the future.
To avoid burnout, you need to ensure you have proper breaks and rest. This can feel counterintuitive when you have a pressing task, but will likely improve your long-term productivity and quality of work.
It also helps to learn to be mindful of your body and its reaction to the stress that arises with overwork so you can take steps to deal with it before burnout occurs. One of the common precursors to burnout is giving up healthy routines due to a lack of time or energy. Being so busy that you stop eating healthy food, exercising or sleeping well is a sign you are on your way to burnout and poor health. Maintaining good nutrition, sleep and exercise as your priorities can help prevent burnout.
Asking for help or talking with someone you trust can also help to prevent burnout.