I can be "mean" by keying your car. But to bring down fire and brimstone to wipe out entire villages, killing the first born of an entire nation, ordering followers to forced marriages of conquest, now that is past "mean".
I want to look at each of these cases, and take a step back. I want to ask the question: Is God's wrath really beyond justification in each of these cases? Or is there a bigger picture here?
Let's start with the Sodom and Gomorrah story. We start learning back in Genesis chapters 13 and 14 that the people in this region were really, really bad news. In chapter 18, we learn that "the outcry against Sodom and Gomorrah is great and their sin is very grave". Things are so bad that the Lord goes down to Sodom himself to investigate. What does He find? A town full of ruffians who were into gang-raping travelers. The only halfway decent guy in the town was Lot, who was himself a foreigner, and the main thing he had going for him was that he was the brother of Abraham, the Man of Faith.
So, there's justice. Where's the mercy? Let's look at the story. First, the Lord gave Lot a "don't look back" chance to escape. (One little condition to that mercy, and his wife failed.) Next, while He had originally declared judgement on the whole valley, he spared the small town of Zoar because Lot asked to keep it as a refuge. (Later on, Lot decided it wasn't worth staying in Zoar, and fled up into the hills, which was what the Lord told him to do in the first place.)
Let's move on to Egypt. What was their crime? Exodus 1 lays it out: Imposing forced labor on guests in their land, and infanticide. That last one is important: It seems God's judgement on Egypt paralleled what Egypt had done to deserve that judgement. Pharoh was even warned from the beginning how far it would go. Pharoh was warned of coming judgement, and given a simple way out: "Let my people go." He not only did not let Israel go, he heaped up the punishments on them. In other words, he was asking for it. Even then, the Lord didn't kill all male children, as Pharoh did, but only the firstborns.
Incidentally, this incident leads straight into the Passover, which is another big pointer to God's methodology of sacrifice, forgiveness, and covenant, acted out in each of these scenarios, and actually fulfilled in Christ. But that's another story.
Finally, on to the "conquest marriages". This refers to certain rules in Deuteronomy concerning how the nation of Israel was to conduct warfare. In a nutshell: If you go to war, and the Lord gives you a victory, and you take slaves, and you want to take one of the slaves as your wife, here's how you have to treat her. You have to give her time to mourn, and if it doesn't work out, she's a free woman, you can't re-enslave her. Now consider the time and the place where this rule was given. In those days, wars were fought, and slaves were taken. What made Israel different? For one thing, there were rules like this one requiring decent treatment of slaves, particularly of female slaves elevated from "slave" to "wife". For another, Hebrew culture pushed for the taming of sexual desires in men and the elevation of women in society. Not to modern levels, to be sure, but far above any of the surrounding nations. But consider: in Hebrew culture, a wife could legally demand sexual satisfaction from her husband, and even his family, but husbands had no place to make such a demand on their wives! I'd say wives in Hebrew culture had it pretty good, even compared to modern sexual relationships. Finally, I personally think that Hebrew rules concerning slave ownership and polygamy virtually guaranteed that one day, both practices would be obsolete. The Hebrews of Moses's time weren't ready for it, but a timeless God can afford to be patient.
Now, how do we move from there to God's bigger story? Well, the relationship between husband and wife is very important in Jewish (and Christian) theology. In Psalms and in the Song of Songs, the relationship between man and wife or groom and bridesmaid is used for the relationship between God and His people. The metaphor goes further: Israel abandoned their Lord and chased after idols, like an unfaithful wife. Nevertheless, the Lord promised to one day woo her back to him, and redeem her.
Anyhow, that's just my few thoughts on this.