Hmm....
If you start a battle through an event command, there's an option not to end the battle upon player death. It does return you to the map, though. You'll still probably need a custom script, but that might at least give someone a head start if they want to reuse some of that code.