We've all been there, I'd say (I have anyway). And most of the time we don't get do-overs, but if we let God take our mess-ups He can use them for His purposes -- even when it is something that was so anti-God that we're ashamed.
He isn't suprised at all by anything. All we have to do is give it to Him. Ask Him to transform our mess to something that will glorify Him.
The other day Hawk and I were reading in Joshua. The people of God had really messed up. God had told Joshua that the people weren't supposed to take any booty whatsoever, but a few of the people couldn't resist to take what they saw. By doing so they put all of God's people in danger. They experienced defeat of a battle and 36 men lost their lives (read it in Joshua 7). Instead of victory they ran away!
Joshua took care of the problem, and when it was time for them to go back into the fight, God used the mess-up to bring victory.
"'(The enemy) will come out after us until we have drawn them away from the city, for they will say, 'They are fleeing before us as at the first.' So we will flee before them. And you shall rise from your ambush and take possession of the city, for the LORD your God will deliver it into your hand.'" (Joshua 8:6-7)
God did exactly that. His people were victorious!
The same thing can happen for us. Whatever we mess up in, we can give it to God and ask Him to transform it. He can actually get us to the point where we look back on it all and wonder how God could have worked it out if we hadn't messed up. Nothing in this life is beyond God -- including failings and backsliding. Just turn to Him and cry to Him and watch Him transform the mess into a thing of Beauty.