The Lord is my Strength and my Shield (see Psalms 18:1, Psalms 18:2; Psalms 119:114). My heart trusted in him, and I am helped. As far as feeling goes, David is already "helped." He feels himself delivered out of his peril.
Therefore, he says, my heart greatly rejoiceth; and with my song—literally, out of my song, which is explained to mean "out of my store of song"—will I praise him. He is ready to offer thanksgiving for a mercy not yet received.