I think I've done this a few times when just before teens/early teens.
Contemplating death from a comfortable life really sucks, the inevitability and possible uncomfortable nature of it is depressing and perhaps frightening.
I could probably still get upset about it in some way if I brood over it for long enough. So I don't. It's mentally filed under "things I just don't want to think about". You know how to do it, everyone has areas they prevent themselves thinking seriously about.
Works for me anyway.