The Imitation of Christ, by Thomas a Kempis, tr. by William Benham [1886], at sacred-texts.com
It is good for us that we sometimes have sorrows and adversities, for they often make a man lay to heart that he is only a stranger and sojourner, and may not put his trust in any worldly thing. It is good that we sometimes endure contradictions, and are hardly and unfairly judged, when we do and mean what is good. For these things help us to be humble, and shield us from vain-glory. For then we seek the more earnestly the witness of God, when men speak evil of us falsely, and give us no credit for good.
2. Therefore ought a man to rest wholly upon God, so that he needeth not seek much comfort at the hand of men. When a man who feareth God is afflicted or tried or oppressed with evil thoughts, then he seeth that God is the more necessary unto him, since without God he can do no good thing. Then he is heavy of heart, he groaneth, he crieth out for the very disquietness of his heart. Then he groweth weary of life, and would fain depart and be with Christ. By all this he is taught that in the world there can be no perfect security or fulness of peace.