Proverbs 14
"In the fear of the Lord there is strong confidence ..." (v26). Even within the logical, good-choices-produce-happiness worldview of the proverbs, there are hints that life can be overwhelming. "Even in laughter the heart may be in pain ..." (v13). Wise people use their words and actions to bless others (v1), not destroy them. But we can do everything right and still face grief and unwelcome surprises.
Therefore, our "strong confidence" is always in the Lord, not ourselves. Life is not a surprise to Him, and He is our refuge.