The Gemara (Sanhedrin 75a) discusses a case of a man who became so lovesick for a woman that he fell deathly ill. The Chachamim said it would be better to let him die than to be intimate with her, and even to see her (unclothed), and even to speak with her through a wall.
The Gemara asks: why is it that we take the prohibition of immorality even on pain of death to such a degree that even to speak with her through a wall is prohibited? One answer presented (that of R’ Acha b. R’ Ika) is that even though she was single, they forbade this “so that the daughters of Israel not be promiscuous toward immorality.”
How far do we take this principle? Let’s say that a man is lying on the floor, and he has no pulse. May a woman do CPR, since that involves pushing on his chest and breathing into his airways? Similarly, is the Heimlich Maneuver prohibited, since that involves giving him a nice, big squeeze around the abdomen?
For the sake of this question, assume that all people involved are Jewish, and that there is nobody else around, and that by the time help can get there it will be too late. Further, I ask specifically according to this answer of the Gemara, so answering that Posek X doesn’t hold of this opinion isn’t a valid answer.