Śrīmad-Bhāgavatam · Text 3.28.36
Who is speaking and story frame
सोऽप्येतया चरमया मनसो निवृत्त्या
तस्मिन्महिम्न्यवसित: सुखदु:खबाह्ये ।
हेतुत्वमप्यसति कर्तरि दु:खयोर्यत्
स्वात्मन्विधत्त उपलब्धपरात्मकाष्ठ: ॥ ३६ ॥
so ’py etayā caramayā manaso nivṛttyā
tasmin mahimny avasitaḥ sukha-duḥkha-bāhye
hetutvam apy asati kartari duḥkhayor yat
svātman vidhatta upalabdha-parātma-kāṣṭhaḥ
Thus situated in the highest transcendental stage, the mind ceases from all material reaction and becomes situated in its own glory, transcendental to all material conceptions of happiness and distress. At that time the yogī realizes the truth of his relationship with the Supreme Personality of Godhead. He discovers that pleasure and pain as well as their interactions, which he attributed to his own self, are actually due to the false ego, which is a product of ignorance.
Read Śrīla Prabhupāda's purport on Vedabase.io