Everything we experience is spoken to us by God. God does not like all the things he has to say (reality is not the way he would most like it to be). But, like Job, we can see that God gives and takes away, gives blessings and takes them away, gives afflictions and takes them away. What Job really wanted and got in the end, apart from blessings and relief from affliction, was God himself.
God speaks to us our experience. So mental illness is an expression of dysfunction in an aspect of our relationship with God. Likewise the effort and process of rehabilitating mental health (or "habilitating" what was never there) is a process of restoring or discovering an aspect of good relationship with God.
A smooth and trusting experience of the moment, repeated over the long term, is the goal of much mental health-seeking. To an extent, this pursuit can be a school for learning to trust God. But there is more to God than just the provider of smooth and trusting experience, just as there is more to a mother than her milk.