Do not lose heart when he rebukes you, because the Lord disciplines those he loves. (Hebrews 12:5-6, NIV)
Remember what kind of creatures we were when we began our spiritual lives: selfish, impatient, fearful, unreliable, proud, and prone to choose our own way.
Is it surprising, then, that our loving and all-wise Father would humble us by struggles, teach us by temptations, prod us through pain, and continually draw us to himself through various needs?
God knows what we need, and all that He does is for our good. If we realized how much He loves us, we would gratefully receive from Him both the bitter and the sweet. He turns the hardest and most disagreeable trials to blessings. Trust Him and humbly submit to Him no matter what comes.