Dying with as few regrets as possible