Has it occurred to you that God might have allowed this problem to happen, just so you'd finally begin to think about your need of Him? After all, if you hadn't had this scare, you might have gone through your whole life without ever thinking of the most important question any person can ever ask: Where will I spend eternity?
Only one thing will keep us out of heaven, and that is our sin. One reason is because sin is rebellion against God–and there can be no room in heaven for a rebellious attitude. But the deeper reason is because God is absolutely pure and holy, and even one sin–just one–would be enough to banish us from His presence. The Bible says that in God's eyes, "whoever keeps the whole law and yet stumbles at just one point is guilty of breaking all of it" (James 2:10).
This is why we can never save ourselves by our own good works, because no matter how good we are, we will never be good enough to stand in God's presence. And this is why we need Christ, because He came into the world to pay the price for our sins. He was without sin, but on the cross all our sins were placed on Him, and He took the punishment we deserved.
Now God in His love offers us salvation as a free gift–free, because Christ paid for it with His own blood. By a simple prayer of faith ask Christ to come into your life and save you–and He will. Then become His follower from this day forward.