If you're referring to Psalm 18:4-6... the Psalmist says "confronted" by death... not dead. Jonah is not confronted by death, he is crying out from the depths of Sheol! If I'm wrong, I hope you can educate me... I don't want to remain wrong.
If you look at 6c, there's a pretty strong correspondence with Psalm 30, one of the Psalms where David speaks about Sheol the same way that Jonah does. David does the same thing in other Psalms that Jonah didn't quote, like Psalm 116:3, and Psalm 86:13. So, unless all of the Psalms with that kind of language are prophetic, or David really did go to Sheol, I think it's poetic language. You can see the same kind of thing in the New Testament, such as when Paul refers to people who are "dead in sin".
Also, in the NT, in Matthew 12:40, Jesus says that as Jonah was in the belly of the fish for 3 days, so he would be in the heart of the earth for 3 days. Now, if Jonah had died in the fish, he would have gone to Sheol just like Jesus, and surely Jesus would have known that. Instead, Jesus is both comparing and contrasting their situations, showing how Jonah was a type prefiguring Christ, but like all types was different and lesser than the antitype that would follow.