It's got to be reading the Old Testament. That is some messed up sh!t.
Your choices are basically to think it's based on things that happened but men's version of events, there is tons of allegory, that it's just a bunch of made up nonsense, or to rip those parts of your Bible out and pretend they don't exist.
I am a Christian, but it's pretty hard to reconcile the two parts if you don't drop the "it's infallible" idea. The whole bit should drop a healthy sense of skepticism into your noodle. I know it does for me sometimes.