“O Lord, you have brought up my soul from Sheol; you restored me to life from among those who go down to the pit.” -Psalm 30:3
“Sheol,” strictly speaking, refers to the afterlife. Much like the Greek idea of Hades. The “pit” is merely a synonym for the same concept. Here Sheol and pit are being used metaphorically for the idea of death itself.
David felt he was as good as dead, like one of those who were to be laid in the tomb. But God rescued him and “brought up [his] soul from Sheol.”
This kind of language reminds us God is in the resurrection business and we can rejoice when he heals us—be it before or after death.