Psalm 34:18 says, The Lord is close to the brokenhearted and saves those who are crushed in spirit. Even in our mess and horrible situations, God will always bring us out if we draw closer to him.
Trust in the Lord with all your heart and lean not on your own understanding; in all your ways submit to him, and he will make your paths straight.
Proverbs 3:5-6