William Cowper, a poet and hymn writer from the 18th century, suffered from severe mental illness. He tried to commit suicide. After spending a year in an insane asylum, he moved in with a Christian couple who cared for him. He continued to be plagued by mental illness, which might explain how he could write such great poetry.
The following verse from his most famous hymn, "God Moves in a Mysterious Way," illustrates his confidence, though fragile, in God's kind sovereignty. Although written in old English, it means a lot to me right now.
Judge not the Lord by feeble sense,
But trust Him for His grace;
Behind a frowning providence
He hides a smiling face.
His purposes will ripen fast,
Unfolding every hour;
The bud may have a bitter taste,
But sweet will be the flower.
Blind unbelief is sure to err,
And scan His work in vain;
God is His own interpreter,
And He will make it plain.