Duncan:
I'm sorry you're facing an apparent change in careers.
However, others have gone through the same thing, in various careers, for various reasons, and have found another livelihood.
An uncle -- professional truck driver -- had a blood clot in his leg that he ignored. One day he was on a delivery and collapsed. Was taken to a hospital. Doctors tried to save the foot but it was gangrenous and had to apputate it. There went his longtime trucking career. He was fitted with a prosthesis foot, but doctors said he was apt to develop more clots because of being a driver. He was in his 50s -- kinda old to start over, many said. However, he found a job with the Texas Air National Guard.
I know of other stories in which health forced changes in career paths. And sometimes it wasn't health or job loss that changed career paths.
All a cousin ever wanted to do was to be a police officer. He went into the U.S. Marine Corps right out of high school, became a military policeman (MP) and when he was discharged, became a police officer for his hometown police department. He went to college part-time on the GI Bill, got married and gradually moved into the private sector (Raytheon), got his master's degree and is now working on his Ph.D. I've never asked him, but my 6th sense is that he didn't find police work as fulfilling as he had dreamed it would.
Perhaps you should talk to your human resources department for your police force/government entity. Surely there are other jobs you could segue into, perhaps temporarily, maybe permanently. Security work should be a place to start. Perhaps going back to school for preparation in a career in which your cardiac condition is not a problem.
The first step is counseling and perhaps something for depression. Then map out what needs to be done to prepare for another career.
If you remember that others have done it successfully, you will realize you're not alone and that will give you some comfort. When we feel alone, we are at our lowest point.
Good luck and God bless.