Only when your eyes are open to the goodness of Christ can you understand that struggles aren't there to punish us, but rather appear to "shape" and "mold' us into who God wants us to be.
We'll look at a difficult life event and say, "how can even a SHRED of good can come out of this?!?" Fair enough (when we are in the middle of the storm), but just because WE can't see how, doesn't mean that He can't. And...*spoiler alert*...HE CAN! "Trust" Him, as with God, all things are possible (Matthew 19:26). The "good" MAY be much different than what we ever envisioned, but therein lies faith (as He knows what's good for us in the long run).
If you find yourself cursing your situation (and maybe even God in the process), remember God is NEVER out to harm you (Jeremiah 29:11). So, with that in mind, what "does" He want you to learn during, and perhaps in some cases "from", your current struggle?