Will pray for you! Keep in mind that if you are a child of God, having repented and believed the Gospel, that your sin, and all of our sins can and will cause lack of assurance from God, and doubt.
He will chastise his children when they sin, Hebrews 12:8ff, yet it is designed to correct us for our own good and lead us to freedom, Luke 4:18.
Remember, He came to save us from our sins, Matthew 1:21 and this is one step in the direction of freedom from that in your life. When true believers are honest they all have a testimony of dark times, struggles with sin, and how God overcame that sin in them. Do not be surprised at how He deals with this, showing the evil of sin to us, convicting, commencing our struggle in Him to overcome, leading to true freedom.
Be in church, a solid Bible preaching church, be in the Bible, be in prayer, get pastoral help. If I can assist you in any other way, let me know.