Recently a regular reader of Gentle Reformation wrote me asking some questions about sin in the life of the believer. In particular, he asked in so many words, "How can someone know if they are a legitimate Christian struggling with sin versus an unbeliever in sin? And what should a Christian struggling with sin do when he feels defeated?" What follows is my letter to him (slightly edited for public posting). As I have been asked these types of questions before, I share it in the hope it can be of use to others.
Regarding a Christian struggling in sin and a non-Christian in sin, I agree they can look similar in some ways. However, there is an important difference where the answer is contained within your own question. It's the idea of struggle.
When the Holy Spirit regenerates a heart and brings faith in Christ with repentance of sin, the soul of the new believer has a new fundamental disposition not found in the unbeliever. The believer now hates his sin for the way that it offends the holy God, and is genuinely grieved over it. The unbeliever may have a sorrow about his sin, but it is not a true sorrow. Paul calls unbelieving sorrow a "worldly sorrow" (2 Cor. 7:10). Believing sorrow is a repenting sorrow (2 Cor. 7:9).
So the Christian truly hates and fights against his sin, knowing there is a war within going on (Rom. 7:23). 1 John 3:9-10 highlights this battle for us, by telling us that a Christian will not continue to practice sin, but will instead seek to practice righteousness. I often tell people if they are struggling and fighting against sin, that's a good sign of the Spirit's work within them. Whereas the sinner is at home in his sin, the believer knows his only true home is in Christ.
So ultimately what separates the Christian struggling with sin to the unbeliever in sin is that the Christian is looking to Christ to save him whereas an unbeliever relies on his own efforts.
When a believer goes through periods of defeat, it can cause a doubt of assurance. The Westminster Confession of Faith says in the chapter on sanctification about the battle against sin: "In which war, although the remaining corruption, for a time, may much prevail; yet through the continual supply of strength from the sanctifying Spirit of Christ, the regenerate part doth overcome; and so, the saints grow in grace, perfecting holiness in the fear of God" (WCF 13.3).
Later, in the chapter on assurance, the Confession says in a very descriptive and prescriptive manner, "True believers may have the assurance of their salvation divers ways shaken, diminished, and intermitted; as, by negligence in preserving of it, by falling into some special sin, which woundeth the conscience and grieveth the Spirit; by some sudden or vehement temptation, by God’s withdrawing the light of His countenance, and suffering even such as fear Him to walk in darkness and to have no light: yet are they never so utterly destitute of that seed of God, and life of faith, that love of Christ and the brethren, that sincerity of heart, and conscience of duty, out of which, by the operation of the Spirit, this assurance may, in due time, be revived; and by the which, in the mean time, they are supported from utter despair" (WCF 18.4).
So yes, you have to keep fighting, employing the means of grace supplied to us in the gospel. Rut Etheridge has a good article about this.
Are you in a faithful church? Your pastor should be able to help you further in these things. If you are not in a good church, if you let me know where you live I can try to help you find one.
May the Lord bless and strengthen you.