Don’t blame God for the consequences of your sin, instead thank him for the forgiveness from it!
Create in me a pure heart, O God, and renew a steadfast spirit within me. Do not cast me from your presence or take your Holy Spirit from me. Restore to me the joy of your salvation and grant me a willing spirit, to sustain me. Psalm 51:10-12