Character Death, when it happens, rarely lasts more than a couple rounds (revivify), or at most a Long Rest (raise dead). With this understanding, maybe we can agree that Character Death in 5e isn't uncommon. PERMANENT character death is very rare, and generally the result of either (a) abandonment (party had to flee/leave), or (b) TPK (no one is alive to rez you). Thus TPK is devastating, because there is no recovery.
I'll add my two pence, but you've heard them before in these 7 pages: Don't fudge dice. Do remind the PLAYERS that not all fights are winnable; running is an option (but not guaranteed). Don't Deus Ex Machina... but Do think about "Rescue/Escape with Cost".
The last one is where there's lots of room to wiggle, but requires knowing your group, which we do not. In my current campaign, the warlock pushed his luck, and died, in the middle of a warzone (allies had fled, as planned, he didn't). He did succeed in his goal, killing the army's two mages. But... the army had couple caster-medics nearby (warlock saw them flee earlier, in fact), who used revivify ON ALL THREE BODIES. So his death was rendered meaningless - dead mages were rez'd - but he was also not dead... just captured by the army leadership. And, because of the decisions of the rest of the party, out of play for the next "unknown number" of sessions (I think 5, as it played out). He made a new character, introduced two sessions later because Story, and we moved on. Offline I roleplayed his captivity with him, and he ended up befriending one of the mages he slew! Fast forward 6 months, and the party is just wrapping up a sidequest from this "enemy" NPC that netted them 2 levels and a bunch of magic gear.
Same warlock, two sessions after that, mis-communicates with the party, charges off by himself (as they all retreat), and ends up dead, stuffed in a crack in the ground. Loooong discussion by the PCs on whether to cast raise dead when they found him! (They did, next session.)
On the other hand, a couple campaigns ago, the party made bad decisions, backed by bad dice rolls, followed with bad tactics, and ended up in a TPK. There was, due to Story, nowhere to go from there. We all just sat there, kinda shocked, and called an end to the night. Next session we talked about it, and mutually decided to "reload last saved game" -- after some bad dice rolls, and after most of the bad decisions, but with an opportunity to fix a couple decisions and use MUCH better tactics. They cleared the complex without losing a single PC (although a BBEG fled this time, instead of staying to enjoy the kill). We all felt much better about that, mutually agreed to "forget" that "bad dream", and we moved on with the campaign.
Another campaign, like the third combat of the campaign, the party ranger was KO'd, but stabilized. The party, unfortunately, pretty much TPK'd; the warforged literally "Nat 20'd" a Death Save the round the last PC fell, got back up, and killed most of the surviving foes. Some, though, took the opportunity to drag their kills into the lake. The warforged didn't need to breathe, so he waded in and saved everyone, he thought. Not sure what happened, but he forgot the ranger. The ranger drowned. The player was like "no biggie, I got five other character ideas ready to try out!" 12 levels and three characters later, that ranger returns to the party in a blaze of angelic glory (and amnesia), and the Story went on.
So pick the solution that works best for YOUR GROUP, embrace it, and move on!