There's no "panic button" like Save and Quit in Diablo III. However, there are some things you can do in advance to help minimize the chances of being stuck in a situation like that.
Be patient. The best way to survive a near-unwinnable situation is to not to get yourself into them in the first place. This rule of thumb applies to all areas of the game:
Don't move into a new area or Act until you're sure you can handle it. When in doubt, level up more and/or acquire better gear.
When exploring an area, move very slowly and cautiously. If you see a pack of Champions that you don't think you can handle, run away. Don't go into combat if you're not 99.9% sure that you can handle yourself. All it takes is running headlong into one pack of Jailer/Vortex/Mortar enemies and you're staring at the character select screen again.
When in doubt, return to an earlier quest (or even an earlier Act) and grind/farm a bit more. An extra hour or two spent grinding is better than another 10+ hours re-leveling another character because you got impatient and died.
Set as many defensive abilities as you can (enable Elective Mode!). My current HC character is a Demon Hunter, so that means setting things like Vault, Smokescreen, Preparation, and Caltrops for most general purposes. For boss fights, make sure you switch to a spec that complements that specific encounter.
Always keep your gear as up-to-date as possible. Where available, the auction house makes this extremely easy in Normal and early Nightmare. Beyond that, you may need to take some extra time to farm up gear before moving on to a new area.
Depending on your class (i.e. if you're not a Monk), consider using a shield. For a minor decrease in DPS, you can increase your survivability by a considerable amount, between the additional armor and block chance.
Use health potions early and often; they're really not difficult to come by if you're properly leveled and geared. If you're using them so often that you're running out, that may be an indication that your character is not ready for the content that you're attempting.
If your internet connection starts getting spiky, immediately pause the game (if you're playing single-player), or town portal. Don't ever risk combat if your latency bar isn't green. (PC version only)
Don't ever use the "Resume" option on the main menu if you can avoid it. Start every new play session from a known safe point, such as a quest that starts in town.
Update for the console versions: Since it's possible to play offline (locally-hosted) with the console versions, it's possible to save yourself on those versions by quitting the game or hitting your console's power button before the game has had a chance to commit your character's death to your save file. However, if you ask me, don't do it; cheating to avoid death goes against the whole point of Hardcore to begin with.