I'm 69 and have a heart condition. Doc tells me to keep my heart rate under 140 and I do exactly that. I spin mostly, sometimes mash, and sometimes stand and mash but my heart rate dictates everything. If I get down to 3mph with a high heart rate, I'm walking
.
Seems to me a combination of spinning and mashing might work best. Mashing could build up leg muscles to make climbing more efficient, and spinning lets your legs "rest" while working your cardio system.
Either way, pay attention to your doc and your body and keep riding. I'm impressed with your dedication to riding despite your medical issue. The real experts will be here any minute . . .