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."

She announced the arrival of Albert Louie Kenny on Instagram, with a photo of her alongside husband Jason - a six-time Olympic gold medallist.
She said he was born late on Wednesday, a week over his due date.
"Welcome to the world little Albert Louie Kenny. 23/08/17 8lb 12.5oz 22.44. You kept us waiting a week but it was all worth it," she wrote.
The 25-year-old, whose hometown is Cheshunt in Hertfordshire, retained the team pursuit and women's omnium titles in Rio that she won at London 2012.
She has already declared her intention to compete at a third Olympic Games in Tokyo in 2020 but has said she will not rush back to the sport.
Jason has seven Olympic track sprint medals to his name - including six golds - making him the holder of the most titles for a Briton alongside former team-mate Sir Chris Hoy.
The relationship between the pair began during the build-up to the London 2012 Olympic Games and they married in Cheshire in September.
Friend and fellow cyclist Dani King tweeted she "cannot wait to meet him".
While Paralympic cyclist Dame Sarah Storey - who is expecting her second child - said it was "lovely news".
End of Twitter post  by @DaniKing1

Tony McMahon's free-kick deflected into the path of Lee Evans as he gave Bradford the lead from close range.
Dale levelled before the break as the ball fell to Peter Vincenti for his sixth goal of the season.
Devante Cole restored Bradford's lead just before the hour and an Olly Lancashire own goal two minutes later put the game out of reach.
Rochdale manager Keith Hill told BBC Radio Manchester:
Media playback is not supported on this device
"I have been very disappointed not just today but over the last season of touchline technical etiquette.
"I've been very disappointed that the technical area teams are trying to win it from the technical area.
"I don't think we lost the game today because the players of the technical area were getting at the referee and fourth official, we've lost the the game today because we made mistakes."
Ambulance crews who gave a cardiac arrest patient 17 high-energy electric shocks say he is lucky to be alive.
[NEXT_CONCEPT]
Four-time Olympic cycling champion Laura Kenny has given birth to her first child.
[NEXT_CONCEPT]
Bradford picked up their first win in five league games as they beat Rochdale at Spotland.