I think so many struggle over their salvation (and I certainly have) because we're like computers being reprogrammed. GIGO = Garbage In Garbage Out. We've been filled with so much garbage in our lives, that garbage is still coming out until we have renewed our minds to the point that our reprogramming begins to take over.
I heard this analogy and posted a short version in a discussion here and wanted to expand on this a bit.
Imagine an unwanted baby being left on the steps of an orphanage. They grow up sleeping in a room full of other kids on a cot. They eat in a cafeteria with all the other kids. If they turn their head, another child snatches food from their plate. They have a favorite toy and they hide it under their mattress lest another child take it for their own. Perhaps some of the underpaid, overworked workers get snappy. They knock over their milk at lunchtime and one of them snaps off "Would you watch what you're doing!" They're ridiculed by the other kids, they're not as pretty. They've been there since birth and not adopted, nobody wants them, they're a nobody.
And one day a couple comes in looking for a child. They've paid big bucks for adoption, gone through a tedious process of filling out adoption paperwork, screenings, etc. And now they come to pick out the child. They see this dirty, tousled haired little girl about 10 years old and immediately know she's the one. This child has now been adopted. They have parents who loved them so much that they paid a lot and gave a lot to get them. They now have a home, their own room, own toys, good meals.
So they go to this new home and are showed the room, toys, etc. At night, they lay awake in the big room. No sounds from the other kids, no hall monitor passing by. They fall in love with a toy in the room and hide it under their mattress lest someone take it. They have not realized the toy is theirs to keep and no one will take it. They sit down to dinner with these strangers who now call them daughter and lean over their plate protective of their food, eyeing the two strangers as if they may snatch it away at any moment as some cruel joke. This goes on for a time. These people keep telling her how beautiful she is, how much they love her, telling her she doesn't need to hide her toys cause they're all hers and no one will take them. It's too good to be true and her mind cannot grasp it. One morning she knocks over the milk at breakfast and cringes awaiting the sting of criticism, and instead is met with "Oh honey, it's ok. I'll get you some more." It happens again a month later and again the cringe comes. She knows she didn't get the bad reaction last time, and yet for 10 years she did. The cringe is a part of her makeup now. It's an automated response.
When we're adopted into sonship, we come with all that baggage. People who have possibly been saved all their lives, or didn't experience traumas, or those who've been saved so long they perhaps have forgotten their beginnings, they just know they trust God and can't understand why you struggle so much. And therefore, you can't understand it. You think you're not saved, you question if you were truly adopted. That's when you have to shut out the voices around you, the taunting of the other children in the orphanage, the sting of the criticism of the tired worker, and start listening to the new voice. The one that's saying those things you can't believe. And it may take months, years. Your computer is being reprogrammed, gigabyte by gigabyte. And those voices of the past don't go away. They can still be present voices at war against the voice of God, trying to keep you thinking you're no good. Trying to keep you thinking the worst.
If you don't run away from your new parents and give them a chance however, eventually your programming will change. One day you will spill your milk and notice for the first time, you did not cringe. And wonder why you've been cringing all this time in the first place. But the barrier has been broken finally in this one area and more barriers will come down as time passes.