It is a part of life to have thoughts such as you are having.
When we are very young we insulate ourselves from these thoughts and think about death only in relation to old people or others we do not know, unless death takes someone close. At some point we have to confront the issue of what we think about it.
I've noticed an attitude of acceptance by people who are very old or people who know they are sick and have little time left. Some have even predicted that they would die soon.
Millions and millions of people have gone into death before us. So have animals, plants, etc. This makes me think that death is a natural transition, not a punishment of some sort, and that what existed before we were born must exist some way after our death.
Whether or not our whole personality carries on, some part of our essence does. I do not think God is wasteful of souls and lives. We learn an awful lot in a lifetime. Would that be wasted in an intelligent universe?
I have terminal cancer but I cannot waste my time worrying about dying as living is a gift so I move on day by day.
Kindly,
Kitt