I want to send you some empathy. My DD, while older, and while not behaviorally a dream, is prone to saying some strange and sometimes disturbing things, and to being seriously distraught about large philosophical questions that I can't always even fully understand. That is, they are vaguely nonsensical, rather like what you describe here, but to her, they are clearly distressing.

She also has spoken of death and wishing to be dead. This took us to a team of psychiatrists. She was diagnosed with depression. However, they were less freaked out by this behavior than I expected, because she eats fine, sleeps fine, plays happily, and so on. They did not suggest medication and felt the situation was relatively mild.