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.
Srimad Bhagavata Purana
श्रीमद्भागवतमहापुराणम्
मूल श्लोकः
मैवं स्युर्मन्दभाग्यायाः क्लेशा निर्वेदहेतवः । येनानुबन्धं निर्हृत्य पुरुषः शममृच्छति
maivaṃ syurmandabhāgyāyāḥ kleśā nirvedahetavaḥ | yenānubandhaṃ nirhṛtya puruṣaḥ śamamṛcchati
SB 11.8.38