Bhagavad Gita 5.22
The joys that spring from external associations bring pain; they have their beginnings and their endings. The wise person does not rejoice in them.
ये हि संस्पर्शजा भोगा दुःखयोनय एव ते।
आद्यन्तवन्तः कौन्तेय न तेषु रमते बुधः॥ye hi saṃsparśajā bhogā duḥkhayonaya eva te|
ādyantavantaḥ kaunteya na teṣu ramate budhaḥ||
English translation (above): Shri Purohit Swami (1935), public domain. Sanskrit text via github.com/gita/gita (Unlicense).