The Zohar, Chapter “Chayei Sarah (The Life of Sarah),” Item 41: Such are the ways of the Creator. If He gives wealth to a person, it is to nourish the world and to do His commandments. If he does not do it, but takes pride in his wealth, he will be struck in it, as it is written, “Wealth kept for its owner is to his hurt.”
…Similarly, when the Creator gave them of the beauty of the superior good of Adam ha Rishon, He gave it to them to keep His commandments and to do His will. They did not do it, but were proud; they were struck in that same beauty with which they were blessed.
Therefore, a person that cries, “Why does the Creator treat me this way?” has to understand that a person himself is provoking the harm. We are the ones who cause our own blows by not correctly using the opportunities that the Creator gives us in order to rise. We stumble on these very opportunities, fall down, then we essentially beat ourselves. This is what The Zohar tells us, “They were struck in that same beauty with which they were blessed.”