One /member/ forgoes reproduction, not one /species/. It's akin to a sibling deciding that they won't have kids so they can help their sibling raise their own. The sacrificing family member passes their DNA on because they share DNA with kin.
It's not that different from a multicellular organism. The vast majority of cells in your body are dead-end lineages. They've specialized into sterile forms so that a few cells in your gonads actually do have a chance to reproduce. Evolutionarily it works because all the cells have the same (or very similar, in the case of kin selection) genes.
So why don’t the one species die out? When do they reproduce?