Srimad Bhagavatam Canto 11, Chapter 08, Text 38

SB 11.8.38

maivam syur manda-bhagyayah
 klesa nirveda-hetavah
yenanubandham nirhrtya
 purusah samam rcchati
 
Translation: 
 
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 Bhagavatam Canto 11, Chapter 08, Text 37
Srimad Bhagavatam Canto 11, Chapter 08, Text 39