I was told there were more stages I would need to complete - [I] disagreed but committed [to it].
There's your mistake.
I ended up with about 4/5 weeks of work to do in 2 weeks.
I feel for you because I have been in your situation, and I have also learnt how to avoid these situations. As a generalisation (perhaps a gross one), programmers tend to be introverted, while bosses tend to be extroverted. When a disagreement arises, it is usually the more forceful personality that "wins".
You rightly objected to your boss's deadline estimate but then agreed to get it done in that time anyway. The professional thing to do would have been to reiterate that in your professional opinion as a developer that there was still four to five weeks of work left and that it was simply not possible to do it all in only two weeks.
I was burnt out after a particularly bad job/boss and I couldn't return to work for two years. Two years after returning to work I had learnt to push back unreasonable deadlines. My team leader told me I had to do a task in three days (estimated by him based on the boss's deadline). I estimated it myself and told him it was impossible to do in less than six days. He told me it had to be done in three. The boss had promised a client it would be done in three days so it was my duty to do it in three. I should work late every day until it was done and do unpaid overtime. I wasn't a team player for refusing.
As you see, a lot of pressure was put on me to capitulate. My team leader badgered me every day to lower my estimate. However, none of this pressure could change the size of the task or the work required to complete it. I ultimately got it done one hour before close of business on the sixth day, my most accurate estimate to date!
Because of my background, I am now very sensitive to unreasonable deadlines and giving false promises. However, when your energy levels are low it's hard to push back. It seems easier to give up and agree. But this has a number of problems:
- You've given your boss an unreasonable expectation of when the work will be finished
- Your boss will use the information you've given them to make business decisions. They might just report to their boss, or they might organise something to coincide with the launch date. Either way, a bad expectation will lead to bad decisions and outcomes. The project could fail if it's time sensitive. Your boss could lose their job (extreme situation).
- You're at risk of further burnout
- Your health can suffer. Your recovery could be prolonged. You will make more mistakes and more bugs. It will take you longer to complete your work if you are able to. You might lose your job (extreme situation).
You have two things you can negotiate on: the length of time, and the number of features. It might have been possible to complete the project on time if fewer features were completed, with the remainder to be done after launch. It's your boss's job to get the work done as efficiently as possible, in terms of money, resources, time, etc. It's your job to communicate honestly when a project or a task will need more money, resources, time, etc. than allowed for. You should also communicate any problems as soon as is practical.
I would advise reading Robert C. Martin's The Clean Coder - A Code of Conduct for Professional Programmers, particularly chapter 2: Saying No.
It might seem like I'm being harsh, but I do understand how being burnt out affects your mental state so that you prefer to "just go with the flow" and "not make waves". You need to focus on your health. I know from personal experience how bad health can prevent you from working, and how it can negatively impact your performance.
The professional thing to do is get well! If that means working less right now, then so be it. When you are well you can work at full capacity. Only when you are well can you work at full capacity. You need to learn to say "no" and present alternatives. When your boss says "It has to be done in two weeks" you say "I would do it if it was possible, but there's at least four weeks of work here. Can we move the deadline or remove some minor features?"
In your one-on-one tell them you recognise that you should have been more forceful in communicating accurate information and that you will keep your boss informed of issues as they arise (which can be as soon as they speak). Let them know your health is still an issue and you're working on it to get back to your usual performance, and that long hours at the moment will impact your health and make the situation worse due to your recent burnout. If you can, get a doctor's certificate stating that you are still capable of performing at your job but that you need more rest than normal until you have recovered. They will probably give a date to review your recovery and advise further.