Bhagavad Gita: Chapter 5, Verse 20

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

na prahṛiṣhyet priyaṁ prāpya nodvijet prāpya chāpriyam
sthira-buddhir asammūḍho brahma-vid brahmaṇi sthitaḥ

naneither; prahṛiṣhyetrejoice; priyamthe pleasant; prāpyaobtaining; nanor; udvijetbecome disturbed; prāpyaattaining; chaalso; apriyamthe unpleasant; sthira-buddhiḥsteady intellect; asammūḍhaḥfirmly situated; brahma-vithaving a firm understanding of divine knowledge; brahmaṇiestablished in God; sthitaḥsituated

na prahrishyet priyam prapya nodvijet prapya chapriyam
sthira-buddhir asammudho brahma-vid brahmani sthitah

Translation

BG 5.20: 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.

Commentary

The section of this verse—neither rejoicing in pleasure, nor lamenting the unpleasant—is the highest ideal of the Vipassanā tradition of meditation in Buddhism.  Rigorous training is undertaken to reach this state of clarity and precision, ultimately leading to equanimity, and destruction of self-will.  However, the same state is naturally reached in devotion to God, when we surrender our will to the divine.  In accordance with verse 5.17, when we unite our will to the will of God, then both pleasure and pain are serenely accepted as His grace. 

A beautiful story illustrates this attitude.  A wild horse once ran into a farm.  People congratulated the farmer on his good luck.  He said, “Good luck, bad luck, who knows?  It is all the will of God.”  A few days later, the horse ran away, back into the forest.  His neighbors commiserated with his bad luck.  He said, “Bad luck, good luck, who knows?  It is all God’s will.”  A few more days went by, and the horse returned with twenty more wild horses.  Again people congratulated the farmer on his stroke of good luck.  He wisely reflected, “What is good and bad luck?  This is all God’s will.”  A few days later, the farmer’s son broke his leg while riding one of the horses.  The neighbors came to express grief.  The wise farmer responded, “Pleasant and unpleasant, it is only God’s will.”  Some more days went by, and the king’s soldiers came to recruit all young men into the army for the war that had just broken out.  All the young men in the neighborhood were taken into the army, but the farmer’s son was left behind because his leg was broken. 

Divine knowledge brings the understanding that our self-interest lies in giving pleasure to God.  This leads to surrender to the will of God, and when the self-will gets merged in the divine will, one develops the equanimity to serenely accept both pleasure and pain as His grace.  This is the symptom of a person situated in transcendence.