You are certainly right to say that some are elected for salvation. Everyone destined for salvation was chosen before the foundation of the world (Ephesian 1:4), which is why Revelation 17:8 teaches that the Book of Life was written before the foundation of the world. Revelation 3:5 does not imply that a name can be blotted out of the book; God denies that he will blot out their names. In the Old Testament the “book” is a little bit different. Exod. 32:33 and Psalm 69:28 do speak about the names of sinners being blotted out of the book, but there is no suggestion that this is the book of the elect; it is just the book of the living. So these OT texts do not indicate that an elect person can be blotted out. No elect person can ever be blotted out of the book. And in fact, Moses asked God to blot him out for the sake of the Israelites who had sinned, and God said no; he would not blot Moses out (Exod. 32:32-33).
It is also clear that not everyone is elect. Those not written in the Book of Life will be thrown into the lake of fire (Rev. 19:15). It is going too far to say that they are created for hell. But it is true that God uses them to display his wrath (Rom. 9:22), so that we truly know that he is a consuming fire. It is so that those who are elect will stand in awe, and praise God for his amazing mercy in Christ, because we know that all people deserve to face God’s wrath.
The bottom line is that God predestines the elect in love, and with the purpose that they praise his glorious grace (Eph. 1:4-6).
I have prayed for you, and I hope this answers helps you.