It is true that God can use all things for our good - even our sin and brokenness. St. Augustine would call sin his blessed vice because he knew his sin would drive him back to the foot of the cross - relieving him from the heavy burden of it. This is the beauty and the wonder of the love of God as revealed in the cross. The answer is in fact - Jesus.
The problem is, over the centuries, this Christian message has been replaced with a message of moralism. It is the attempt of the human heart to perfect, sanctify, etc. via moralism, being-a-good person, service, prayer, etc. as a way of dealing with shame and guilt when only Christ, and Christ alone can deal with our guilt and shame! The response when we sin is not to hide behind "try harder", good works and piety rather, in the words of Luther - to fly to Christ!
It is the precious love and acceptance of God that deals with our brokenness; and repentance, being "good" people is a fruit of this relationship not a pre-requisite! This is a fantastic video that lays this all out so beautifully and excavates the Christian faith from mere moralism to a truly liberating force that can transform the human heart!