I still maintain that (possibly other than drugs), sleep is his best friend. He's largely unproductive at the moment, so a few hours "lost" to sleep is no real loss. What it will probably do is make his remaining wakeful hours more productive.
"If you have no answer, then don't post anything, and let others answer."
I don't see any answers in your post.
Go get a good long sleep. Rest. Get a hammock and sleep on parks. Enjoy life. Work is not life. Work is means to an end but not life.
Please understand, I think your advice is good whenever it is possible. We should all try to get a good night of sleep, whenever we can. But sometimes it is not possible, and this thread is about those situations.
I assume you are intelligent enough to know that sometimes sleep is impossible. If I doubted your intelligence, then I might list the many situations where you advice does not apply. I will offer just one anecdote from my experience: in 2003 myself and my business partner were going to meet with investors on a Wednesday, to ask for $250,000. We were out of money, so we had to impress the investors, or we were doomed. I started getting ready for the demo on Monday, and I kept running into bugs, more and more bugs, endless bugs. I ended up working for 20 hours, then getting 2 hours of sleep, then working for 20 more hours, so that we could give a demo on that Wednesday that was bug free.
Sometimes sleep is not an option. That is what this thread is about.
And how good was your bugbusting on Tuesday? If you'd gone home at 5, got a proper night's sleep, and done a 6 hour day on Tuesday with a clear head, do you think you'd've caught more, or fewer bugs?
(mildly fictionalized account) Last week I pulled my colleague away from trying to fix some data loss in our production system. He pointed out, quite correctly, that unless this was fixed by midnight then our client reports would be incorrect. They were; we've apologised; we may lose clients over this. I still maintain it was the correct decision, because if he'd continued to mess with the production system in that state, there's a non-negligible chance those incorrect reports could've turned into something much worse.
As for your sob story, why in the holy fuck did you put off the work until the week of the meeting?
I'll bet you 90% of these companies working ridiculous hours are run by programmers.
One of those professions is not like the others.
And the question being asked is clearly, how do you keep operating when you have to work extreme hours?
And the honest answer is that, beyond a certain point, you simply can't. No-one is super-human. And clearly from the description the OP has given us, they have reached this point.
When you're being pressured to do those hours and you're already burnt out, it can be difficult to see your situation objectively and to make rational decisions about how to proceed. You are severely mentally impaired. The first step to fixing a problem is acknowledging that it exists, but in this sort of situation denial and misplaced faith that some sort of heroic effort will make everything better is all too common a response.
In reality, if taking enough time out to have a decent meal, a bit of exercise and a proper sleep before continuing will cause catastrophic failure of the project then the project was already in so much trouble that the OP should bear no responsibility for what happens next. Playing hero at the expense of their own health is most likely just delaying the inevitable.
Sure, there could be an exception here... But it's about as likely as winning the lottery every week for a year.
Which one of those things doesn't belong? 5 of those are responsible for the health and/or lives of other people. They aren't sitting at a desk.
Unless you're working on some critical infrastructure, which is probably a very small percentage of people, in what circumstances should computer programmers be working "extreme" hours? Very, very few.