The slice of time you occupied doesn’t disappear when you die; death doesn’t erase you having been here. Things don’t have to be permanent to be valuable. The world is forever changed from you having been here, in ways that are obvious and ways that you could never know.
The mathematical improbability of you having been born makes you cosmically lucky to have existed at all. There is nothing that will allow us to escape the fear or despair of death, not even religion, which universality means you’re not alone in these feelings. We didn’t exist for billions of years prior to being born, and that was totally fine, so it stands to reason that death will be similarly peaceful. Death connects us with the universe, returning our atoms and energy to nature.