Well done.
Happens occasionally - I recall an AN F27 crew (on the Mt Gambier run if I recall correctly) had an elderly lady collapse with a heart attack. The FO applied CPR until a paramedic arrived and made the unpleasant call - very distressing for the lady's relatives who had been at the airport to see her off on the flight.