Oh goodness, I can sympathize with you quite a bit here. If you include the females and all the little guys I bred, or even not and only counting the males, since I started back in 2009 I don't even like to bother going back and counting the amount of bettas I've had(but I can assure you is FAR more then just five....you, my dear, in comparison to me shouldn't at all feel guilty!). Though a great many of them I did rehome when I moved, there is still a large number that passed on in my care from a good number of various causes and there is never a time when one does that I don't question my ability as a keeper and wonder if I'm really doing these fish any favors.
Currently the betta whos spent the most time in my care has been with me for just a little over a year, and considering their potential lifespan this does make me wonder sometimes as well.
However, I also remind myself that these bettas(at least the ones I take home, but I assume the majority of yours were as well?)were bred in places that are mass-producing fish to meet supply and demand, and then are sending them off to be kept in small, cold, dirty cups for often several weeks usually when they're still quite young in a lot of cases. Being kept in these conditions and treated so poorly I think really does a number on their lifespan, messes with their immune system, and opens them up to all kinds of issues that can develop right away, or just hit them later on and life, even in some of the very best conditions.
So, though its always hard, I think at the very least we were able to give them a taste of what it was like to live in a proper, loving home before they passed on, even if they had a terribly short life. So try not to feel too guilty!