Bhagavad Gita 2.38
Chapter 2: The yoga of knowledge
सुखदुःखे समे कृत्वा लाभालाभौ जयाजयौ ।
ततो युद्धाय युज्यस्व नैवं पापमवाप्स्यसि ॥ ३८ ॥
Taking as equal pleasure and pain, gain and loss, victory and defeat, gird thee for the battle; thus thou shalt not incur sin.
Sanskrit text and English translation: Annie Besant, The Bhagavad-Gita, 4th edition (1922) — public domain, via Wikisource. Chapter summaries: SamayaVeda.