If you want to come to know the mind of God, read the Gospels and the Prophets. This is not to say that the rest of the Bible isn’t inspired and profitable for doctrine and reproof. Indeed it all is, as Paul wrote to Timothy (II Timothy 3:16), but we need to understand what much of the Bible is.
Much of it is history, a recounting of things that happened without an endorsement of the actions of the characters, even the actions of the heroes of the Bible.
When Abraham banished Hagar and her son Ishmael into the desert, we should not take that as an example for us to follow. They could have died because of Abraham’s action, and likely would have had the Angel of the Lord not intervened.
When we read of societal chaos in the Book of Judges, we should recognize it as a reporting of events, not a reflection of the will of God.
Scripture needs to be read in full context in order to ascertain the God-intended understanding. A great example of this is Job. Much of that book presents Job’s three friends pontificating their very flawed theologies about God’s character. What they say might seem plausible enough, but in the end their perceptions prove to be narrow and oversimplified. It is only near the end of the book that we learn of God’s anger at Job’s three friends because “you have not spoken of me what is right, as my servant Job” (Job 42:7). Here we’re told not to believe the things said about God in the prior chapters of that book.
And then there are the great, inspiring passages in the Hebrew Scriptures that reveal the hearts of sometimes hurting, often joyful, but always worshipful souls. Think of Psalms and Ecclesiastes. These passages help us in our relationship with God through the hearts of others.
Agreed that “all scripture is given by inspiration of God, and is profitable for doctrine, for reproof, for correction, for instruction in righteousness.” But if you want a direct line into the mind of God, listen to what he says directly. You find that unfiltered in the Gospels and the Prophets.