Salvation is of the Lord.    

Psalm 40 Verses 1 to 3
Jonah is often called, 'the reluctant prophet', because he didn't want to take God's warning of judgement to the ungodly people of Nineveh. After he ran away, God had to deal with him, by allowing him to be cast into the sea and swallowed by a great fish. During his three-day ordeal, he prayed and learned a great lesson about God's dealings with men, namely, 'Salvation is of the Lord'. In other words, our salvation comes entirely from God himself.
This theme is taken up by the psalmist David (Psalm 40 Verse 1 to 3), where he recognises that his own deliverance was entirely the work of God.

He sees this in a fourfold way.

Where God found us:

(Vs2) "he brought me up also out of a horrible pit and out of the miry clay" 
Here we find the sinner, living in sin and sinking fast, with no one to rescue him. He cannot help himself and apart from God coming to the rescue, the sinner will be lost forever.

Where God put us:

(Vs2) "and set my feet upon a rock"
What a contrast from sinking clay to the solid rock. The Bible tells us clearly in 1st Corinthians chapter 10 verse 4 "that rock was Christ". Just as a massive rock cannot be moved, so our placing in Christ, by faith, guarantees our eternal security.

Where God sent us:

(Vs2) "he established my goings"
In our sins we were on the wrong road, leading away from God towards eternal doom. But salvation, not only lifts us, and secures us; it also puts us on the road to heaven and eternal life.

What God gave us:

(Vs3) "and he had put a new song in my mouth"
The world's song is shallow and doesn't last, but our song is a new song. It comes from grateful hearts and offers praise and thanks to the one who saved us. This was the song the children of Israel sang (Exodus 15) when they were delivered from Egypt and the Pharaoh.

Read Psalm 40 carefully and you'll recognise as Jonah did that, 'Salvation is of the Lord'. He planned it; he provided the means and points us to the remedy in his Son. Man has no say in it except to recognise this and trust Christ as the hymn says:-

    Nothing in my hands I bring,
    Simply to the cross I cling.

When we recognise what we have been rescued from, were God has placed us and how he has put us on the right road, then we'll begin to sing and praise his glorious name.