When we remove ourselves from under Gods protection, we will lose our hope. Solomon, the wisest man in the bible, had so much. God bless Solomon with a great abundance of wisdom, wealth, He made him king, and so much more.
Everything was fine while Solomon remained obedient to God, but once He stepped out from under Gods protection, he became very depressed, he lost his hope, and everything under the sun appeared to him as being meaningless. Once he found his way back to God he regained his hope and confidence again.
I have seen all the things that are done under the sun; all of them are meaningless, a chasing after the wind. Ecclesiastes 1 : 14