Four attitudes for a clear mind
Yoga Sutra 1.33मैत्रीकरुणामुदितोपेक्षाणां सुखदुःखपुण्यापुण्यविषयाणां भावनातश्चित्तप्रसादनम् ॥
maitrī-karuṇā-muditopekṣāṇāṃ sukha-duḥkha-puṇyāpuṇya-viṣayāṇāṃ bhāvanātaś citta-prasādanam ||
Translation
The mind becomes clear and calm by friendliness towards the happy, compassion towards those who suffer, joy towards the good, and calm distance from those who do wrong.
In simple words
A friend wins a prize: be glad, not jealous. Someone is hurting: help. Someone does good: cheer. Someone is rude: do not let it into your mind.