This blog post from Tullian Tchividjian is worth your time. A few of my favorite quotes:
Job’s maintained his joy and perspective in a season of suffering because he held onto a robust theology of grace. Job knew that he was not entitled to anything he had—God held the title to everything.
Our response to suffering reveals what we’re building our life on and what we’re depending on to make life worth living. This means that suffering itself does not rob you of joy—idolatry does. If you’re suffering and you’re angry, bitter, and joyless it means you’ve idolized–and felt entitled to–whatever it is you’re losing.
Joylessness and bitterness in the crucible of pain happens when we lose something (or think we deserve something) that we’ve held onto more tightly than God.
Much of our anger and bitterness is [the result of] God prying open our hands and taking away something we’ve held onto more tightly than him.