I'm not aiming this at anyone in particular, but if you want to help someone who's having a bad time, especially who's depressed, try to find another way of helping instead of saying "is there anything I can do to help?"
That offer seems helpful but it means the person who is suffering now has a new task: finding you something to do.
Instead think of a way you can help and offer that.
It takes the burden onto yourself, and crucially it shows what level of help you actually mean.
@Loukas Isn't that kind of the point of the phrase, though? For true friends, we already know what they need and we just help. For the neighbor we've seen twice in the last year, we say "Let me know if there's anything I can do to help." knowing that it's largely a hollow offer.
@Loukas A little of both. If someone I don't know tells me they have cancer, I don't really know how to react to that other than very basic sympathy. And that's what the hollow offer has become in modern language... an expression of sympathy.
@LouisIngenthron sympathy is great, so express it in ways that aren't hollow offers please.
@LouisIngenthron is that a question or a statement of what you already believe?