When you think God is going to cast you away for something you should have done, but didn't, or did do, but shouldn't have, that is legalism and bondage.
While it is good to attend church, and hear the Word of God and fellowship, God is only going to judge you on one thing - "Did you love Jesus?"
Now, if for you, not attending church equals not loving Christ, then you seriously need to read your Bible. There is actually only one Scripture, Hebrews 10:25 that tells us to not forsake the assembling of the brethren. You need at least two verses to make a doctrine, and even at that it is sketchy.
The Bible is quite clear that we need to repent and believe in Jesus. That is what saves us! And Jesus keeps us saved! But if you feel guilt, try and figure out whether it is the Holy Spirit or your own conscience that is speaking. Because if it is the Holy Spirit, I would advise you to listen, and make sure you attend church next week. If it is your conscience, that might be a sign too. But not a sign that you have lost your salvation.
By the way, what church or denomination are you attending? Do they say you are going to lose your salvation if you don't attend church? Or is this something you came up with yourself?
My advice, as always, is read your Bible. Start in the New Testament, and then later, read Psalms, and then Genesis through to 2 Kings, and Proverbs. The prophets are hard to read, but there is great value in reading them, too. (You should read 1 & 2 Chroncles, its just that the first 11 chapters of 1 Chronicles is all geneologies - wait till last to read those two books!)