Psalms 34:17-19 (KJV):

v. 17: The righteous cry, and the LORD heareth, and delivereth them out of all their troubles.

v. 18: The LORD is nigh unto them that are of a broken heart; and saveth such as be of a contrite spirit.

V 19: Many are the afflictions of the righteous: but the LORD delivereth him out of them all.