Passage
In my distress I called upon the LORD, and cried to my God: and he did hear my voice out of his temple, and my cry did enter into his ears.
In my distress I called upon the LORD, and cried to my God: and he did hear my voice out of his temple, and my cry did enter into his ears.
2 Samuel 22:5 When the waves of death compassed me, the floods of ungodly men made me afraid;
2 Samuel 22:6 The sorrows of hell compassed me about; the snares of death prevented me;
2 Samuel 22:7 In my distress I called upon the LORD, and cried to my God: and he did hear my voice out of his temple, and my cry did enter into his ears.
2 Samuel 22:8 Then the earth shook and trembled; the foundations of heaven moved and shook, because he was wroth.
2 Samuel 22:9 There went up a smoke out of his nostrils, and fire out of his mouth devoured: coals were kindled by it.
The verse centers on "called", "distress", "upon", "lord", "cried", "hear", "voice", and "temple". It is saying that the verse draws attention to "called" and "distress", so its meaning should be read from those terms before moving to application.
The nearby context moves from verse 6's "The sorrows of hell compassed me about..." into verse 8's "Then the earth shook and trembled the...", so "called" and "distress" belong inside that flow. In 2 Samuel context, the local focus is covenant, worship, and faithfulness.
A plain takeaway is to answer the verse's own emphasis on "called" and "distress" with trust shaped by these words, not by a vague optimism outside the passage.