Patrick Ewing, 66, collapsed at his home in Oakham, Rutland, and was given resuscitation by his partner, Yvonne Ainsworth.
Paramedics used a defibrillator to shock Mr Ewing to restore his normal heart rhythm for almost an hour.
East Midlands Ambulance Service (EMAS) said only about 8% of patients survived a cardiac arrest outside hospital.
Andy Swinburn, of EMAS, said: "Patrick's case is extremely rare. His heart muscle was very unstable, which lead to a repeated cardiac arrest meaning the crew had to shock him 17 times."
Mr Ewing said: "It's an astonishing thing to tip over the edge and be hauled back again.
"What they did for me might of just been part of their day job but they worked so hard to keep me going. I will forever be grateful."
Ambulance crews who gave a cardiac arrest patient 17 high-energy electric shocks say he is lucky to be alive.