When you experience afflictions, you should recognize God behind the mask. It's like a father who's playing with his little son by putting on a frightening mask to see if he'll recognize him. The boy is scared, but when he realizes that it's his father, he calls out, "Father, Father!" Then, the father, seeing that his son is frightened, takes off the mask and embraces him, to remove his distress and comfort him.
When you are suffering, understand that there's nothing but God, blessed be He, and it's your own Father in Heaven who has put on this frightening mask to see if you'll recognize Him. If you call out, "Father, Father!" your suffering and distress will be removed. But if a person doesn't realize that everything that happens is from God, blessed be He, and when afflictions come, seeks only worldly means and remedies to escape them, then his troubles and distress will remain. I tell you, when you realize that God is everywhere and there's nothing separating you from Him, blessed be he, all your fears and troubles will disappear."— Baal Shem Tov , The Light and Fire of the Baal Shem Tov by Yitzhak Buxbaum