The Lord was not being vengeful toward Israel in their rebellion against Him. They broke the covenant and received the consequences that they had agreed to.
When a person or society is crushed by their rebellion, it appears that the Lord is angry with them and is wreaking judgment upon them.
However, our Lord is gracious and plenteous in mercy. But we must repent to be able to access those blessings. Without repentance, the broken law has its effect.