We will never be perfect here on this earth. Saved, yes...but saved does not make us perfect. It simply means that now we are God's and He's able to work in us and through us. And, chances are, once satan knows you're saved, he will come at your weak spots again, and again...and again. Because his goal is to make you useless in the army of God. To focus you in on your problems so tightly that you miss the grace of God and His plan for your life. To get you to stop trying.
So what do we do?
We choose to push our focus back towards God. We choose to pick ourselves up again, by His strength. We choose to believe in His changing power in our lives. Because what other choice do we have? To give up? To stay where we are? Neither are ones I want to make. You?
You may keep making the same mistake. It may drive you nuts. But remember, God is bigger. He can change you. It might take longer than you ever thought, but keep on keeping on. Life in Him is a process. The change that occurs is your testimony. And it will change lives--yours included. If you simply choose to keep moving. One small step at a time.