Bhagavad Gita 14.24
Who accepts pain and pleasure as they come, is centered in their Self, to whom a piece of clay, stone, or gold are all the same, who neither likes nor dislikes, who is steadfast, indifferent alike to praise or censure;
समदुःखसुखः स्वस्थः समलोष्टाश्मकाञ्चनः।तुल्यप्रियाप्रियो धीरस्तुल्यनिन्दात्मसंस्तुतिः॥samaduḥkhasukhaḥ svasthaḥ samaloṣṭāśmakāñcanaḥ|tulyapriyāpriyo dhīrastulyanindātmasaṃstutiḥ||
English translation (above): Shri Purohit Swami (1935), public domain. Sanskrit text via github.com/gita/gita (Unlicense).