Bhagavad Gita 6.32

Chapter 6: Meditation

आत्मौपम्येन सर्वत्र समं पश्यति योऽर्जुन ।
सुखं वा यदि वा दुःखं स योगी परमो मतः ॥ ३२ ॥

He who, through the likeness of the Self, O Arjuna, seeth equality in everything, whether pleasant or painful, he is considered a perfect Yogî.

Sanskrit text and English translation: Annie Besant, The Bhagavad-Gita, 4th edition (1922) — public domain, via Wikisource. Chapter summaries: SamayaVeda.