Bhagavad Gita 12.17
He who is beyond joy and hate, who neither laments nor desires, to whom good and evil fortunes are the same, such a one is beloved to Me.
यो न हृष्यति न द्वेष्टि न शोचति न काङ्क्षति।शुभाशुभपरित्यागी भक्ितमान्यः स मे प्रियः॥yo na hṛṣyati na dveṣṭi na śocati na kāṅkṣati|śubhāśubhaparityāgī bhakitamānyaḥ sa me priyaḥ||
English translation (above): Shri Purohit Swami (1935), public domain. Sanskrit text via github.com/gita/gita (Unlicense).