Aww, don't be so harsh on yourself, you tried your best, think on the bright side, he had a good place to die, or like, he spent his last moments in a nice place.
Fishes do die sometimes, wherever is our fault or not, sometimes they get sick and no matter what you do they end up dead.
I know you are still mourning and all, but you should try to get a new one to the new house, that will be a way to ease your pain, since there are tons of bettas in such a bad places, especially at some pet-stores, then you have a new chance to make it up to yourself. =]
And please you didn't fail at him, when he needed you, you helped him, right? So, even though he died, you tried your best.