Is God good all the time or is God angry all the time? There is no doubt that both the goodness of God and the anger of God are clear in Scripture. How is it that God can be kind and wrathful at the same time? William G. T. Shedd sheds some light on this in the following quote in the light of the cross of Jesus (the language is a little archaic so read it twice!):
In all that is said, consequently, respecting the wrath of God, in Christian theology, it is of the utmost importance to keep in view the fact that this wrath is compatible with benevolence and compassion. This is the infinite difference in kind between divine and human anger. At the very moment when God is displeased, he is capable of devising kind things for the object of his displeasure: “While we were yet sinners Christ died for us” (Rom. 5:8). And at the very instant when guilty man is conscious that divine wrath is resting upon him, he may address his supplication for a blessing to the very being who is angry with his sin and may pray: “from your wrath, good Lord, deliver me.” And the great and ample warrant and encouragement for men to do this is found in the sacrifice of the Son of God. For in and by this atoning oblation, divine compassion conciliates divine wrath against sin. In the death of the God-man, “righteousness and peace, justice and mercy, kiss each other” (Ps. 85:10). The mercy vicariously satisfies the justice; divine compassion in the sinner’s stead receives upon itself the stroke the stroke of divine wrath; God the Father smites God the Son, in the transgressor’s place: “Awake, O sword, against the man that is my fellow says the Lord of hosts” ( Zech. 13:7). Dogmatic Theology, 706.