I like the quote Dave gave in his comment:
To ask for what we want is human, to accept what we are given is grace.But I can accept that for adults more than I can for a child in pain she can't understand.
A friend commented by email that while things won't necessarily be well for individuals, she believes God is at work in leading the human race somewhere through all our pain and struggle. I believe that too, but it doesn't work for me as a way to live with the problem of undeserved suffering. I don't believe that a particular person's suffering is necessary to God's plan. (update 12/7: I didn't mean to imply God has a specific plan but something more like that God's intention for the world includes us learning by trial and error.)
I think the most helpful thing I have heard is the idea of just trying to be at peace when things aren't going to be ok. Peace is a good thing, whether justified or not, and I can see that if I am walking with someone going through a hard time I will be a better companion if I can find peace in myself than if I am frustrated that things aren't getting better.