How had Job changed? (Job 42:2) 42:1 Then Job answered the Lord and said: 2 “I know that you can do all things, and that no purpose of yours can be thwarted. 3 ‘Who is this that hides counsel without knowledge?’ Therefore I have uttered what I did not understand, things too wonderful for me, which I did not know. 4 ‘Hear, and I will speak; I will question you, and you make it known to me.’ 5 I had heard of you by the hearing of the ear, but now my eye sees you; 6 therefore I despise myself, and repent in dust and ashes.”
Job 42:2
ESV - 2 I know that you can do all things, and that no purpose of yours can be thwarted.
For follow-up discussion and general commentary on the topic. Comments are sorted chronologically.
He openly and honestly faced God, and admitted that he was the one who had been foolish. Admit to God that you don't even have enough faith to trust him. True faith begins in such humility.