Oof. This. I got a lot of this when I found out I inherited an incurable terminal condition from one of my parents.
The least helpful (if well-meaning) were people saying things like, "Well, things could be much worse" or "At least you don't have to deal with..." or "I just get the feeling things are going to be okay" or "God has a plan for us all".
I feel that almost always the response is other people scrambling for something to say that will end the conversation on a positive note, or else avoid having to confront the reality of existence. I recognize that it makes other people feel better to do that, so I don't mind. I personally don't like being confronted with death when I'm not ready for it, either, so I can understand why people behave the way they do.
But I guess the experience has taught me to only ever bring it up with someone if they've been through something similar before and they mention it first. Some people may never understand, and that's okay -- but those who do will know what to say and won't give you empty one-liners that gloss over your situation.