Srimad Bhagavatam Canto 10, Chapter 16, Text 34

SB 10.16.34

anugraho ’yam bhavatah krto hi no
dando ’satam te khalu kalmasapahah
yad dandasukatvam amusya dehinah
krodho ’pi te ’nugraha eva sammatah
 
Translation: 
 
What You have done here is actually mercy for us, since the punishment You give to the wicked certainly drives away all their contamination. Indeed, because this conditioned soul, our husband, is so sinful that he has assumed the body of a serpent, Your anger toward him is obviously to be understood as Your mercy.
 
Purport: 
 
Srila Madhvacarya points out in this connection that when a pious person suffers in this world, he realizes, “The punishment the Supreme Lord is meting out to me is actually His causeless mercy.” Envious persons, however, even after being punished by the Lord for their purification, continue to envy Him and be resentful, and this attitude is the reason for their continued failure to understand the Absolute Truth.
 
Srimad Bhagavatam Canto 10, Chapter 16, Text 33
Srimad Bhagavatam Canto 10, Chapter 16, Text 35