The key word in those three verses at the bottom is "righteous". It is the "righteous" that God hears, the "righteous" that God is close to, and the "righteous" that God delivers. I believe "the righteous" not only means saved, but righteous in heart and life. There are benifits to staying right with God! There are benifits for living according to God's ways! Who knows when you or I will need to "cry out" to God? Who knows when we will need Him to deliver? Live right, think right, act right, love right--there are benifits!
------------------------------------------------------------------------------------------------
The righteous cry, and the LORD heareth, and delivereth them out of all their troubles. The LORD is nigh unto them that are of a broken heart; and saveth such as be of a contrite spirit. Many are the afflictions of the righteous: but the LORD delivereth him out of them all.
Psalm 34:17-19