All things contribute to good for those who love God. And, as a matter of fact, since God can and does know how to draw good from evil, for whom should He do it, if not for those who, without reserve, have given themselves to Him?
Yes, even sins, from which God by His goodness defends us, are reduced by Divine Providence to good for those who belong to Him. Never would David have been so full of humility had he not sinned, nor would Mary Magdalene have been so full of love for her Lord if He had not remitted so many of her sins. And never could He have forgiven her these sins if she had not committed them.
You see, my daughter, this great architect of mercy: He converts our miseries into grace and makes salutary medicine for our souls from the venom of our iniquities.
Tell me, please, what could He not do with our afflictions, our sufferings and the persecutions that we endure? If, then, you are ever touched by some unpleasantness, from wherever it may come, assure your soul that, if it loves God, everything will be converted to good. And although you may not see the means by which this good will happen to you, be assured that it will happen. –St Francis de Sales in a letter to a novice sister