Psalms 13:4-6
4 My enemy will say, “I have triumphed over him,” and my foes will be glad because I am shaken. 5 But I have trusted in your covenant faithfulness; my heart will be glad because of your deliverance. 6 I will sing to Yahveh because he has treated me kindly.
The psalmist is shaken, but not overwhelmed. His confidence is in God. He considered the possibility of his own death, but has concluded that even that would be no reason to give up his faith. God has treated him kindly in the past, and he expects deliverance in the present. If he were to fall asleep in death, the enemy would gloat. But God will have the final victory.