If you have committed sin, then be encouraged, there is hope! 1 John 1:9 says that if we confess our sin, then he is faithful to forgive us and to clense us from all unrighteousness. That good news, so just because God knows what you have done, I encourage you to go ahead and acknowledge to him verbally that you know what you did was wrong.If you find yourself tempted to committ the sin again, immediately change what you are thinking about. This may seem difficult at first, but with practice you can overcome this challenge in your life. The best and quickest way to change what you are thinking about is to speak aloud, preferably speak something that God has already said about you. Here is an example,"I am the righteousness of God in Christ Jesus and I have been seated with Christ in Heaven!" This is the new creature that you have become if you have made Jesus lord of your life. This is how God sees you, so you might as well agree with him.I encourage you to take a look at 2 corinthians 5 and Ephesians 2. That is where I quoted from above. It is also very important that you speak aloud!For it is by grace through faith that you are saved ( made righteous) and not of works, lest any man should boast of his own doing> Ephesians 2:8I thank you for your question and hope I have been of help. one more thing that I do is keep a scripture in my back pocket, this helps me to keep God's word close by, if tempted, then I can always reach back there and speak God's word to keep my mind occupied... I will continue to post blog's that will be helpful concerning these subjects.