Looking at when Job finally gets it right in Job 42 and "spoke about God accurately (v. 7)"
Job said,
“I know that You can do all things
and that no plan of Yours can be thwarted (v. 2)."
and
"Surely I spoke of things I did not understand,
things too wonderful for me to know (v. 3)."
also
"My ears had heard of You,
but now my eyes have seen You (v.4)."
after which Job retracted his previous words (roughly 40 chapters complaining), repenting in dust and ashes.
What had Job's ears heard of God? and what now had his eyes seen of God?
Well, I suppose Job had heard the same as we have heard tell of God. For instance, Jeremiah 29:11 tells us God's "plans I have for you, ...plans to prosper you and not to harm you, to give you a future and a hope." And, knowing that, look back at Job 42:2b "and that no plan of Yours can be thwarted."
Then, let's look at Job 42:3 and ask if it is revealed to us what "things too wonderful for Job to know" are. Well, the book of Job allows us to see "behind the curtain" the things hidden to Job at the time of his ordeal. And, although Job wondered that he'd lost his future and hope, we know that what he had in his future.
I think that, when Job said, "but now my eyes have seen You," it was Job no longer wondering if God had forsaken him and actually realizing that God never had, as Job most likely have heard of Him, as we have, that "I will never leave you, nor forsake you."
"Even if I make my bed in Shaeol, You are there."
Seeking comfort from friends in your struggle is different from complaining of your struggles to your friends. Job's 3 friends didn't provide him with much encouragement though, they added to his suffering. But I think a deeper study into what Elijah told him might, reveal a true friend Jobe, and of God, that told him to "be still and know that He is God."