Hi Alex,
Sorry to hear that you may have to have surgery. I was around your age when I had to have my aortic valve replaced (with a St. Jude's mechanical one) due to a congenital defect. This was around four years ago (I'm 27 now) and at that time I remember feeling excited about the upcoming procedure. Now I'm not saying that it was all fun and games, but with the way my health had been deteriorating and the way I had been feeling physically in the run up to my surgery, I was just happy and relieved to hear the cardiologist say that they were ready to go ahead with the replacement. Anything was better than the way I was feeling on a daily basis, and the way this was making me feel depressed as I couldn't "keep up" with my peers. Luckily my surgery was a "breeze", as anyone will attest to there are some uncomfortable/painful/difficult periods throughout the post-surgery experience, but I think that, by-and-large, for most people these are temporary bumps on the road to recovery.
The reason I'm posting is that, as you will see from my profile, I have been suffering from the same depressing, morbid thoughts about life-expectancy as you have, only mine have come three/four years post-surgery. They hit me during the second year of my PhD, and have really had an impact on my studies to the point that I have fallen behind.
Now I just want to share something that I am just coming to realise myself. Six weeks after the surgery I went to my first anti-coag clinic, and the woman who was to become my wife came with me. Although we got a taxi there we decided to walk home and see how things went; this was probably the best decision of my life and led to one of the best days of my life. It took us about three hours to get home, but this was because we had lunch, sat in the park, looked in shops, etc. Sure I felt tired and a bit weak, but I could feel that I was getting better and the day felt like a massive achievement. Two months later we went to Paris for a few days and had the time of our lives. By nine months post-op I had started a Master's at the University of Manchester, when I finished that I begun a PhD. In the past four-five years my wife and I got married, we went back to Paris for our honeymoon and also travelled on an overnight train to Venice. We've been to Berlin, Verona, and Copenhagen, along with doing countless amazing things with friends and family that would never had happened had I not had the surgery.
To top it all of my wife in now pregnant with our first child, I've got two amazing part-time jobs to help to support us (one is in a book shop, one is teaching undergraduates), we're moving to a new house, and I'm back on track with my studies. In the next year or so I will be a new father and fully expect to have a PhD. Just realised that I might sound like I'm boasting, but I hope you realise that I'm just trying to show how rich and full a life can be had after surgery. I feel quite ashamed of how much I dwelled on life-expectancy and let it effect my studies and general day-to-day life. But now I just try to think that even if I get knocked over by a bus tomorrow (that old-chestnut), my new valve fails, or one of those tragedies that befalls unfortunate folk at the beginning of Six Feet Under strikes me down, at least I've tried my best.
Sorry for going on so long, but my basic point is this; don't worry about how long you'll live, let the doctors worry about your heart, and you worry about doing you best in the course that you have been offered.