Chapter 5 · The Yoga of Renunciation · Krishna said
Bhagavad Gita 5.23 — Mastering desire and anger
शक्नोतीहैव यः सोढुं प्राक्शरीरविमोक्षणात्। कामक्रोधोद्भवं वेगं स युक्तः स सुखी नरः ॥
śaknotīhaiva yaḥ soḍhuṃ prākśarīravimokṣaṇāt | kāmakrodhodbhavaṃ vegaṃ sa yuktaḥ sa sukhī naraḥ ||
Meaning
One who can withstand the surge of desire and anger here, before leaving the body, is a yogi and is truly happy.