One of God's names is Eternal. Therefore, Eternal punishment is God's punishment. Having sinned, we deserve to be punished, but Jesus wrought the atonement, and by so doing made an escape for us. Therefore, if we repent and enter into a covenant with Him via baptism by one of God's authorized servants to keep God's commandments, we may be forgiven. Such a covenant is not to be taken lightly, for if we break it, we are subject to the punishment that we would have otherwise had to bear. The punishment for unrepentant sin is separation from the Eternal Father, which we must endure if we do not accept the atonement of Christ on our behalf. He endured it for our sakes and it was such that it caused him great agony, causing him to sweat great drops of blood. Now the diversity and degree of sin is also to be addressed in this context, for some sins really are greater than others. Murder, or the shedding of innocent blood being the worst, and sexual sin a close second. This because it is impossible to make restitution for such actions. We cannot bring back to life someone if we were to kill a person, and we cannot restore chastity to either ourselves or our partner if we commit sexual sin. Nevertheless, it is possible to receive forgiveness if we seek it with much penitence and refrain from further sin. Some murderers may receive forgiveness dependent upon their understanding of what they have done, for instance, if their parents planted in their bosoms a burning hatred for a certain party of people and taught them murder, and if upon receiving the truth of the matter they repent, but their sins will be answered upon the heads of those who instigated those behaviors.
However, not all sins have the same impact, and it is unreasonable to think that God, being just, would put those sinners in with all of the murderers, etc. But while any unrepented sin will separate us from God, there are, as Paul taught, three degrees of glory. There is a glory Celestial, as of the sun, terrestrial, as of the moon, and telestial, as of the stars. God dwells in a Celestial glory, and those who enter into all of the covenants with God that He has prepared for us and is faithful to the end to them, will be joint heirs with Christ, be exalted, and inherit with Him, all God has. There will be others who are worthy of living with God in Celestial glory, but only as servants. Then there is another world, which glory is as the moon compares with the sun. Those inhabitants may not enter into the Father's presence, but they may have from time to time, visitors from the Celestial glory, such as Christ and family members. The last world has a glory only likened to that of the stars as they compare in glory to the moon, having varying degrees of brightness. Then there are those, who, knowing the truth and having received a witness of it through the power of the Holy Spirit, yet wittingly sin against that witness, are cast into a bottomless pit at the Day of Judgement, which is reserved for the devil and his angels. It is the period between death and the day of Judgement that the spirits of the unjust are in torment, then comes the Day of Judgement where we acknowledge our judgement is just.
Now we know that David, having murdered Uriah, rejoiced in the hope which he had that his soul would not remain in hell; nevertheless, he lost his exaltation, and he and all others who lost their exaltation, will have a perfect remembrance of their lives with God previous to our mortality and have an everlasting torment and regret that they did not conduct their lives in such a way as to merit returning to their presence.