I want to change this, how?

I really want to change my reactions when me and my boyfriend fight. I am always walking out of his place, going to my car and going home. he is tired of it, tired of chasing me, I am tired of doing it, it’s immature and wrong.

what can I do in the moment of when fights happen?