I had a really hard time with medical anxiety after my dad almost died from pancreatitis suddenly. Stomach pains, heart palpitations, numbness in various places. I was convinced I had 10 different fatal diseases. I wasn’t making up symptoms. I had real pain, a chronic cough, and real pvcs that showed up on ekgs. It took a lot of doctors and a lot of tests to convince me that I was okay. And then i started to understand that all of my symptoms matched a single disease— “anxiety”. And I started focusing on letting things go and not thinking about it and avoiding triggers like caffeine and all of my symptoms just ... stopped. A miraculous cure of like 10 different things I was utterly convinced I was dying from. Even the pvcs and my non-stop post nasal drip stopped almost entirely.
"Scared to death" is not just an expression, as your case perfectly illustrates.
There's a general tendancy to discount the matters of the mind when treating the body, but both are very much connected and usually for a good reason—at least from an evolutionary perspective. In the US, there's often a stigma associated with just admitting weakness. Support exists but it's not always easy to come by.
It helps a lot if you can find a Primary Care Physician who has at least some notions of psychology and can help bridge that gap—and if needed, recommend the help of specialists regarding our thought processes. (In your case, it sounds like you were on your own to figure this out: glad it worked out, though!)
Similar here: had chest pain, heart palpitations, racing pulse, shortness of breath, dizziness etc. for more than a year. The pain and dizziness was real and worrying. Was convinced I was going through heart failure in my 20s. Took a while to get an appointment with a cardiologist, but I got it and he did a few tests, said "it's just stress" and from that moment on the symptoms essentially disappeared. Boy was my face red (from face disease, I believe).
The body is fucking weird.