We have to realize that
A) Different writers wrote those books… so each one can articulate things in a different way.
B) There are different writing styles and not all are designed to be taken literally.
C) There are literary devices such as hyperbole or others where an author can over state things for affect OR describe things as they appear from a limited viewpoint verses reality.
D) The writer is employing a metaphor.
Galatians is talking from a human perspective about how God loves us ALL and doesn’t want us to love false gods or worldly things as much as him. - In a manner of speaking, one COULD say this is like a jealous lover.
In Ezekiel, the verse is talking about human beings when we ARE jealous. Not as a way means to teach something else about humanity, but to actually tell us that expressing jealousy is a sin.
So we have 2 different senses… One literal and one more figurative.
::EDIT::
Secondly, one could argue that IF the 2 verses TRULY contradict and are not merely an apparent contradiction, but an impossible contradiction… then the bible is flawed. IF it is flawed on something so fundamental to faith and morals concerning jealousy, then we have less reason or possibly NO reason to trust it at all.
If we can’t trust it, then logically we have no reason to believe that God is jealous OR that jealously is that bad. Thus resolving the contradiction by simply dismissing one.
However, if we dismiss one verse (which one?) then could we argue that ‘besides that one verse which we through out, the bible is without contradiction’ - which then means we have to take it seriously, again.
But wait… it gets more confusing… because if it is without flaws and we have to take it seriosuly… then WHY did we throw out or disregard that 1 verse? - Maybe we should add it back in… which then gets us into a potential contradiction.
So really… the only way to avoid this loop is that one verse is logically non-literal and wasn’t intended to actually mean that God is jealous.