In those days Job lived with the assurance that God was favourable towards him, and he was therefore not afraid of the future for the future was in God’s hands. He lived with a sense of well-being, and it did not seem to be a hard thing for a believer to please God for the Lord is naturally pleased with his children.
It is hardly surprising that Job should react less than perfectly under such extreme pressure, and no doubt we would have fared very much worse in his circumstances, but his failings are set before us to teach us the way in which we can also fail in our lesser trials if we do not watch. All self-pity is weakening and evidence of weakness, for it is an alternative to trusting in God for strength.
But Job still had a source of comfort available to him; it was the comfort of knowing that his God was still with him (Matthew Henry). The knowledge that God is our loving heavenly Father and that this relationship can never change is what sustains the believer in his greatest trials. God has not changed in his love for Job and still planned to bless him and restore him and assure him in visible ways that he was a child of God. Because he had the unbreakable promises of God, Job had enough even in the midst of this trial to be assured that God would never let him go. This must be our comfort in every situation, no matter how dark the clouds above us.