To the pilgrims of the Dispersion in Pontus, Galatia, Cappadocia, Asia, and Bithynia, 2 elect according to the foreknowledge of God the Father, in sanctification of the Spirit, for obedience and sprinkling of the blood of Jesus Christ:We must never forget that although scripture contains many exhortations and encouragements for us to live righteously, and we certainly should heed these, our rebirth is only because of God's abundant mercy. It is He who saved us, He who begot us again.
Grace to you and peace be multiplied.
3 Blessed be the God and Father of our Lord Jesus Christ, who according to His abundant mercy has begotten us again to a living hope through the resurrection of Jesus Christ from the dead, 4 to an inheritance incorruptible and undefiled and that does not fade away, reserved in heaven for you, 5 who are kept by the power of God through faith for salvation ready to be revealed in the last time.
(1 Peter 1:1-5, New King James Version)
Not only is it He who saved us, it is He who keeps us. No matter how often, or how badly we fail, He never abandons us. There are consequences in this earthly life for our failings, often serious consequences, and there will even be loss of some reward in eternity, but our eternal salvation is kept in Him, by His grace and love. (See 1 Corinthians 3:11-15) It is He who reserves our share of Christ's inheritance, and it is He who keeps us by His power.
We can never take pride in being saved, because we did not do any of it, God did it all.
The book of James made it clear that we are to watch our actions and make sure we are walking as we should. (See "Useless Religion", "Pure Religion", "Dead Faith", "Who is at the Helm", "More on Wisdom", "Watch Your Own Step", "Whose Plan", and "What to Do"). Putting James together with this and many other passages of the New Testament makes it clear: we are responsible for our actions, but God is responsible for the saving of our souls, we simply need to trust in Him to do that.