Patanjali Yoga Sutra 1.33
The mind becomes clear by cultivating friendliness toward the happy, compassion toward the suffering, joy toward the good, and steadiness toward the unhelpful.
मैत्रीकरुणामुदितोपेक्षाणां सुखदुःखपुण्यापुण्यविषयाणां भावनातश्चित्तप्रसादनम् ॥
maitri-karuna-muditopeksanam sukha-duhkha-punyapunya-visayanam bhavanatas citta-prasadnam ||
The mind becomes clear by cultivating friendliness toward the happy, compassion toward the suffering, joy toward the good, and steadiness toward the unhelpful.
To keep your mind clear in a chaotic world, you must actively train four specific social responses: