Bhagavad Gita 5.20

न प्रहृष्येत्प्रियं प्राप्य नोड्विजेत्प्राप्य चाप्रियम् |
स्थिरबुद्धिरसम्मूढो ब्रह्मविद् ब्रह्मणि स्थित:

Translation

Established in God, having a firm understanding of divine knowledge and not hampered by delusion, they neither rejoice in getting something pleasant nor grieve on experiencing the unpleasant.