What to do in a dead lost position?
Resign!
Well, not. An other option could be: 'give your opponent an opportunity to make a mistake'.
In the following game from the 2020 chess.com daily chess championship, I blundered a piece in one of those 'must win' games.
So, what to do? My first idea was to resign and withdraw the tournament. But then I reconsidered and made my bet: pretend the blunder was a sacrifice and go for an 'all in' attack.
I was lucky: my opponent made a mistake, I won that game and kept chances to get to next round.
Definitevely not the best played game, but an entertaining one.
The moral of this game is that, even in a lost position, if you can keep the attack alive, there is a chance your opponent will blunder back, because defense is harder than attack.