Wait on the Lord
In the process of turning back to God after you sin, when does the joy return? When David wrote his prayer of repentance in Psalms 51, he asked God to restore his joy, which means it hadn’t been restored yet. By the time he wrote Psalms 32, his joy was back. How do you know when it’s time to move from the brokenness of guilt in Psalms 51 to the restored joy in Psalms 32?
There is a time for sorrow. When someone hurts you deeply, you don’t want the person to chuckle and say, “Oops, sorry,” and go along his merry way. If he wants to restore the relationship, he has to take what he did seriously. God is the same way. If you try to skip right to the joy without going through the contrition, it won’t work. If you’re not taking your sin seriously and you try to seek joy from God, he will send you right back to Psalms 51. Or James 4.
“Wash your hands, you sinners, and purify your hearts, you double-minded. Grieve, mourn and wail. Change your laughter to mourning and your joy to gloom.  Humble yourselves before the Lord” (James 4:8-10).
Contrition is appropriate for a time. However, when someone you love has been contrite after hurting you and you forgive him, you don’t want him to remain in a groveling posture indefinitely. You don’t want him to keep bringing it up, and you don’t want him to stay sad forever. That would be a rejection of your love. When you forgive, you want the joy of the relationship to be restored. 
After sinning against God, there is a time for grief and there is a time to move on from that grief. Peter sinned with enthusiasm when he denied Christ. He put his back into it, swearing up and down that he didn’t know Jesus and calling down curses on himself if he was lying (Matthew 26:69-74). But when he came to his senses, he went out and wept bitterly (Matthew 26:75). Did he keep weeping like that the rest of his life? No. Only for a time.
How do you know when it’s time to return to the joy of your salvation after a failure? Take your cues from God. 
“Though I have fallen, I will rise. Though I sit in darkness, the Lord will be my light. Because I have sinned against him, I will bear the Lord's wrath, until he pleads my case and establishes my right. He will bring me out into the light” (Micah 7:8-9).
When your relationship with God is damaged, he will allow you to sit in the darkness for a time. You don’t feel the closeness you’ve enjoyed with God in the past. All the byproducts of God’s nearness—joy, hope, renewal, strength, motivation, insight, the ability to enjoy God’s gifts—they come only in the tiniest trickle, if at all. You’re sitting in the dark.
You know the discipline is over when you’re able to come back out into the light. God enables you to enjoy his gifts again. Strength returns. You can meet with him in his Word again. The darkness begins to lift.
Many times that happens much more quickly than we expect. You may feel like you’ve sinned so egregiously, weeks of grieving would be appropriate. But God lets you return to the light in a matter of minutes.
Other times, it’s the reverse. What you thought was a minor failure results in weeks in the darkness. God is not a vending machine that can be controlled by our acts of contrition. He is a person, and the ordeal isn’t over until he decides it’s over. Your role is to seek hard after him and wait.
What if the darkness never seems to lift? If you find yourself in an ongoing state of distance from God, stuck in Psalms 51, it’s not because God is holding you at arm’s length. He doesn’t withdraw himself from his children indefinitely. When we repent, he is eager and quick to forgive. Greif is to be short-lived. The duration of his displeasure is the blink of an eye compared to his favor.
“His anger lasts only a moment, but his favor lasts a lifetime; weeping may remain for a night, but rejoicing comes in the morning” (Psalms 30:5).
His anger is like lightning—awesome and dangerous, but momentary. His love is like sunshine—constant, pervasive, and enduring—persisting even when your eyes are closed.
He is a Judge, but he doesn’t deal with his children as a judge—handing down sentences with judicial disinterest. He is like a tender-hearted father, who, after a few blows, ends the matter. And after the tears of repentance have flowed, gathers the child in his arms in forgiving embrace, making it clear that the child is free to smile and laugh and play again.
If you have repented of your sin but still find it difficult to draw near to God, it may be that you are holding yourself in the darkness even after God has forgiven you. Perhaps you’re not seeking God the right way. 
It’s also possible that God has granted you access to his presence, but you have failed to interpret it for what it is. You’ve experienced his presence, but you thought it was something else.
It is beyond the scope of this book to provide a full study of how to draw near to God and how to know when you’ve experienced closeness with him. For that, I recommend the sermon series “Loving God with all Your heart” available on TreasuringGod.com and my book Delight Yourself in God. 
For now, remind your soul of the truth about God’s nature. He is slow to anger and abounding in love for you, he’s quick to forgive because he loves forgiving you, and no one who repents remains unforgiven. There is no condemnation for those who are in Christ because their sins are separated from them as far as the east is from the west and buried in the depths of the sea.

Godliness Training Exercises

1)	If there is a sin in your life where your repentance has been weak, memorize James 4:8-10. Ask God to take you through the kind of brokenness and contrition that would be appropriate for that sin. One tool used by God’s people in Scripture to help bring your heart to proper contrition is fasting.
2)	Are there painful consequences of your sin that haven’t been converted into godly sorrow? Make an effort to use the pain of those consequences or the pain of disappointment in yourself to produce contrition before God.
3)	Take time each day this week to vividly imagine yourself in the prodigal son story until you are moved by the part where the father runs to embrace the son.
4)	If you have anxiety because you feel like a loser in life, read or listen through the sermon, “Love Your Loserness” from James 1:9-11 available on SermonAudio.com.