Evolution is not optimizing for your personal happiness. There are some species that are virtually immortal [0] and even they can reproduce sexually.
It’s just better for you to die. Your DNA sucks, make room for your superiors (your children).
I jest, but dying is the smart choice. It’s like a giant AGI system letting a few of its minor instances being cut off: no problem, we’ll fork a few new ones. They might even be better.