One of the Bible's greatest truths is that Christ died to take away all our sins–not just part of them, but all of them: past, present, and future.
This is why you shouldn't fear that you will lose your salvation every time you commit a sin. If that were the case, you and I would lose our salvation every day–because we sin every day. Even if our actions are pure, our thoughts often are not. And even if our actions and thoughts are pure, we still sin because of the good things we should be doing but fail to do.
Never forget: Your salvation does not depend on you and how good you are.
It depends solely on Christ and what He has already done for you through His death on the cross. The Bible says that Christ "appeared once for all at the end of the ages to do away with sin by the sacrifice of himself" (Hebrews 9:26).
Does that mean it doesn't matter whether or not you sin? No, of course not. Sin is serious; it is an offense to God, and it breaks our fellowship with Him. Sin also compromises our witness for Christ. The Bible is clear: "Be holy, because I am holy" (1 Peter 1:16).
But you cannot live the Christian life in your own strength. You need God's help–which is why He has given His Holy Spirit to you. When you sin, confess it immediately, and then seek the Holy Spirit's help each day to live as you should.