I know there are a lot of lists out there of 'things to say to a friend who is going through a tough time' but I thought I would add my two-cents to the pile. This can apply to anyone who is sick or who is struggling to cope with a new situation in their lives.
1) Say something that acknowledges the problem without trivializing it.
"I heard about your (whatever) problems, that must be tough."
"I heard about your problems, that sucks."
"Sucks you are going through all that stuff right now."
"I don't really know what to say but I'm thinking of you."
2) Saying 'let me know if you need anything' is great but some concrete examples can be helpful. It can be hard to ask for help when you aren't sure what the person had in mind. Did they mean they would clean my house or that they would go out for coffee sometime?
"I make a mean lasagna, how about I bring one over for you?"
"Here is some wine for us to drink together tonight."
"Why don't we try out that new yoga class together next week?"
"Call me anytime you need to talk, seriously, the middle of the night is fine."
"Why don't I babysit the kids next week so you can nap or run errands or get your nails
done?" (Obviously this does not apply to me)
3) Try to avoid saying the cliches that tend to ignore the fact that the person is going through something quite significant and personal:
"Everything happens for a reason."
"It must be God's will."
"God only gives you what he knows you can handle."
"Everything always works out ok in the end."
"A friend of a friend of mine knows someone who had the exact same problem as you and
everything turned out fine and/or they died."
(I'm not going to freak out if you say one of these to me but know that I am no longer listening)
4) Maybe you could say something awesome and empowering instead:
"Do you need to rant? I'm here if you do."
"You are amazing."
"I can't imagine what you are going through."
"I admire how you are handling (whatever), it must be so hard."
"I love you."
5) If you do want to tell your story of the time you went through something horrific too, it helps if you preface it with a disclaimer. No one likes someone telling them how to cope with their situation.
"I know its not the same but I found that punching the wall seemed to help with my loss."
"I can't imagine what you are going through but know that you aren't alone in being
confused and angry."
6) Understand that the person might be tired of talking about their problems and they might just want to hear the latest story of how your mother-in-law is ruining your life. Don't push for information if they obviously don't want to talk. They may have just spent the last hour trying to explain everything to their grandmother and are exhausted of the topic.
7) Most important of all, just say something. It doesn't matter if you didn't say something when they first started having the problems, they do want to hear from you. The first minute of the conversation will probably be awkward but it will be worth it. It can be incredibly isolating to be ill or going through something tough. Some people would rather avoid the situation because sick or struggling people remind them of their own mortality and the randomness of life. Don't be one of those douchebags. Be there for the person and let them know you love them.