A man, for instance, has faith in his riches, in the lands he has purchased, and the houses he has built. His affections naturally follow in the channel of his faith; and he loves what he believes in. His possessions become his God. In what way can this bond of unholy union be sundered? It is by destroying, in whole or in part, the objects to which this wrong confidence and these wrong affections attach themselves. If the objects remain in their strength and beauty, and fulfill all the purposes which are expected of them, how is it possible to destroy confidence and attachment? "I spake unto thee," says God, " in thy prosperity, and thou saidst I will not hear." [Jeremiah 21: 21.] And accordingly, he is compelled, as it were, to send his flood and fire, his pestilence and famine. Smitten and blasted in the work of his hands, man's faith in human toil and acquisition at last fails; and he exclaims, with the wise preacher of the Scriptures, "All is vanity and vexation of spirit." It is then, and not till then, that he is ready to hear and obey the voice of his Maker.
Again, man has confidence in his reputation. With care and labor he has established a good name, which seems to him a tower of strength. His love corresponds to his faith; and he loves his honor, as he terms it, still more than his wealth. But since the fall of man, selfishness, instead of holy love, has become the basis of humanity; and envy, base, malignant, and insidious, always follows in the track of fame. God, who knows his idol, has allowed the destroyer to cast it down. Before he is aware of it, his good name, which had been secured by years of toil and care, which shone high and bright as the sunbeam, is prostrated in the dust. His tears show how great and bitter is his disappointment. From that hour, ceasing to place confidence in himself, he can say, what he never said before: "I called upon the Lord in distress. The Lord answered me, and set me in a large place. It is better to trust in the Lord than to put confidence in man." [Ps. 118:5, 8.]
And it is thus in other things. Looking everywhere except to God, man is everywhere doomed to disappointment. And God, in the exercise of his mercy, means that he shall be. It is in mercy that the divine hand is heavily upon him. In his wealth, in his health, in his good name, in his worldly wisdom in everything which separates him from God, the storms from heaven sweep away the sandy foundation on which his frail house is built. Ceasing, under such circumstances, to have faith in himself, and in anything which depends upon himself, he has nothing left him but hopelessness and despair. And it is in this necessity that he begins to think of the true source of help. Despair of himself leads him to seek God.
From A Treatise on Divine Union (1851) Part 5, Chapter 7 by Thomas Cogswell Upham. You can find that post and others at The Hidden Life: http://thomascupham.blogspot.com/2015/01/false-confidence.html