My DD3 has been like this since she was 8, on and off (she's just about to turn 10). I found that trying to reassure her that she "won't die" was really futile, because she's a clever girl and she knows that some children do die.
So, I took the opposite approach and said that yes, some children do die, and we don't know why, but they do. Sometimes because they've been very ill, or other times because they've had an accident. It's very, very sad when that happens, but most children don't die, because that's how she knows so many adults. They were all children once.
Then we went on to talk about if you spend all day worrying about dying, what's the point of being alive? You're wasting your day. We'll all die one day, but we have to use the life have well. (It helps here that DD has a faith, so we linked into Bible verses about God looking after you and knowing all your days).
Now, DD3 recognises triggers for those thoughts. It's usually tiredness, and she'll say "Mum, I need to go to bed quickly, because I'm really tired and I can feel those thoughts are going to come."
I do think she is vulnerable to OCD, tbh. She washes her hands too much and has to apply hands cream because they dry out, after a "germ busters" session in year R made a real impression on her. She checks if we've washed our hands before we cook, and tells me if someone doesn't wash their hands after the toilet.
She's also fastidious about her hair and, at one point, was using 7 hair bands to tie her hair up so that it was perfectly pulled back and straight. It would take her about 30 minutes to do her hair. I totally lost it with her one day and said it had to stop, and she weaned herself down gradually, to 4, then 3 bands. Now she'll usually use 2 bands.
She over ate at her grandparents and was sick one night, and ever since she leaves food on her plate 'in case I get ill again'.
Overall, though, the 'dying' thing does fade and come back.