“On the day when I act,” says the Lord Almighty, “they will be my treasured possession. I will spare them, just as a father has compassion and spares his son who serves him. And you will again see the distinction between the righteous and the wicked, between those who serve God and those who do not.” Malachi 3:17-18
This mirrors what is taught in Thessalonians 4:13-17 which reads:
But I would not have you to be ignorant, brethren, concerning them which are asleep, that ye sorrow not, even as others which have no hope. For if we believe that Jesus died and rose again, even so them also which sleep in Jesus will God bring with him. For this we say unto you by the word of the Lord, that we which are alive and remain unto the coming of the Lord shall not prevent them which are asleep. For the Lord himself shall descend from heaven with a shout, with the voice of the archangel, and with the trump of God: and the dead in Christ shall rise first: Then we which are alive and remain shall be caught up together with them in the clouds, to meet the Lord in the air: and so shall we ever be with the Lord.
So, not only do we have in the last book of the Old Testament scripture telling us that the Lord will save us when he separates the good from the evil, again in the New Testament we have the word that God will raise the dead and take the good to live an eternity in heaven.