Srimad-Bhagavatam: Canto 11 - Chapter 1 - Verse 38


मैवं स्युर्मन्दभाग्याया: क्लेशा निर्वेदहेतव: ।येनानुबन्धं निर्हृत्य पुरुष: शममृच्छति ॥ ३८ ॥


maivaṁ syur manda-bhāgyāyāḥkleśā nirveda-hetavaḥyenānubandhaṁ nirhṛtyapuruṣaḥ śamam ṛcchati


A person who has developed detachment can give up the bondage of material society, friendship and love, and a person who undergoes great suffering gradually becomes, out of hopelessness, detached and indifferent to the material world. Thus, due to my great suffering, such detachment awoke in my heart; yet how could I have undergone such merciful suffering if I were actually unfortunate? Therefore, I am in fact fortunate and have received the mercy of the Lord. He must somehow or other be pleased with me.