If/when humans go extinct, it will be sad. It will not cause past good works to be undone, or good lives to be unlived.
A child whose life was saved in 2016 had ten years of life they would otherwise have spent dead. A child born in 2016 and raised in a loving home had ten years of life they would otherwise have spent not existing. A group house started in 2016 had ten years of community they would otherwise have spent alone, or at least in a slightly worse group house: the best alternative to that negotiated agreement. Whatever successes and triumphs you have had in the past ten years, those years happened, they are banked, they are safe, they cannot be reversed. The hedons and utilons and fuzzies are on the scoreboard, if there is a scoreboard.
To be sure, some of the scores will be lower than projected. The child saved from malaria will not live forever and inherit a galaxy. We will get the regular short-term positive scores expected by those who didn't believe in the Singularity, or believed it would cause extinction. That's okay. Some religious people expect their good works in this life to cause uncountable riches in the next. That doesn't make their good works more meaningful than the good works done by atheists because they are good and they work. And there is still good to do.
Disclaimers:
If you acted to make the Singularity occur sooner, that's still terrible.
An ASI could choose to exactly cancel out all past good works, but it won't.
Using geometric rationality to defend against variants of Pascal's Wager.
Valuing trajectories, not outcomes, since the outcome is Heat Death.