Epictetus
Enchiridion 16
When you see someone weeping in sorrow, either because a child has gone on a journey, or because he has lost his property, beware that you be not carried away by the impression that the man is in the midst of external ills, but straightway keep before you this thought: "It is not what has happened that distresses this man (for it does not distress another), but his judgement about it." Do not, however, hesitate to sympathize with him so far as words go, and, if occasion offers, even to groan with him; but be careful not to groan also in the centre of your being.
Epictetus, Enchiridion 16, translated by W. A. Oldfather
When you see a person weeping in sorrow either when a child goes abroad or when he is dead, or when the man has lost his property, take care that the appearance do not hurry you away with it, as if he were suffering in external things. But straightway make a distinction in your own mind, and be in readiness to say, it is not that which has happened that afflicts this man, for it does not afflict another, but it is the opinion about this thing which afflicts the man. So far as words then do not be unwilling to show him sympathy, and even if it happens so, to lament with him. But take care that you do not lament internally also.
Epictetus, Enchiridion 16, translated by George Long
When you see a man shedding tears in sorrow for a child abroad or dead, or for loss of property, beware that you are not carried away by the impression that it is outward ills that make him miserable. Keep this thought by you: 'What distresses him is not the event, for that does not distress another, but his judgement on the event.' Therefore do not hesitate to sympathize with him so far as words go, and if it so chance, even to groan with him; but take heed that you do not also groan in your inner being.
Epictetus, Enchiridion 16, translated by P. E. Matheson