Śrīmad-Bhāgavatam · Text 6.10.9
Who is speaking and story frame
एतावानव्ययो धर्म: पुण्यश्लोकैरुपासित: ।
यो भूतशोकहर्षाभ्यामात्मा शोचति हृष्यति ॥ ९ ॥
etāvān avyayo dharmaḥ
puṇya-ślokair upāsitaḥ
yo bhūta-śoka-harṣābhyām
ātmā śocati hṛṣyati
If one is unhappy to see the distress of other living beings and happy to see their happiness, his religious principles are appreciated as imperishable by exalted persons who are considered pious and benevolent.
Read Śrīla Prabhupāda's purport on Vedabase.io