This is going to sound VERY unorthodox but it has worked for me. If you find that you've sinned, begin to thank the Lord for that sin. Paul tells us to give thanks in all things for this is the will of God in Christ Jesus concerning us.One day as I was sitting there wallowing in my self pity over my habitual sin, a thought passed into my mind to give thanks for my sin. At first I thought that this was crazy, but I did it anyway and I was glad that I did. I just said, Thank you Jesus for ______________! My self wallowing stopped and I felt encouraged.It wasn't a quick fix, but the condemnation stopped every time I did.