The Prophet (s) was empathetic, not sympathetic.
Here is the difference:
Once we have provided that empathy to the person in need, trust them to have gratitude themselves.
That is the difference.
The gratitude will come from within. You can remind them of the verse of the Quran after you find they have climbed out of the abyss somewhat.
Telling them to have patience and gratitude will not cause them to feel it… they may just fake it… Remind them of the benefits, after you have been empathetic. Then see the difference bi iznillah.
Whoever is granted wisdom has indeed been granted something tremendously beneficial; but none reflect except people of insight. [Quran 2:269]
May Allah SWT make us people of wisdom and action. Ameen.