...Let me emphasize that trusting God does not mean we do not experience pain. It means we believe God is at work through the occasion of our pain for our ultimate good. It means we work back through the Scriptures regarding His sovereignty, wisdom, and goodness and ask Him to use those Scriptures to bring peace and comfort to our hearts. It means, above all, that we do not sin against God by allowing distrustful and hard thoughts about Him to hold sway in our minds. It will often mean that we may have to say. "God I don't understand, but I trust You." - From Trusting God by Jerry Bridges.
What a comfort it is knowing God is in the midst of our pain and adversity. Indeed, He is behind it. We can have confidence that we are where we are by His merciful will.