My suggestion is that it seems it happens when you get angry so try to recognize your anger coming on for the first step.
Then tell yourself to not say anything right then and do something else instead. Like if you are on the phone just say "I have to go now, bye" and hang up. If you are with your gf walk out of the room if you are tempted to say something you'll regret. You will then break the pattern as you keep doing it more and more (it will become a new way of reacting).
Later on you will be able to replace the behavior you don't want (calling gf names) with something that will make you feel better about how you reacted.
There are books on Assertiveness Skills that you can get in libraries. These skills teach us to relearn what we say to others by giving us an alternative mode to react in. You can also learn these skills through a counselor if you wish. It will take a little time and just be patient with yourself. You might want to invite the gf to learn the same skills, too.
So, in the future your goal could be to still be able to talk to your gf and say something different. You might say instead (after you learn these new skills) something that will have you and the gf feeling like you have accomplished something. An example would be: Say your girlfriend did not show up on time for a date 2 times in a row. With new assertiveness skills you would tell her 1. what she did and then 2. how you felt. Maybe you'd say "You did not show up for our dates and I feel annoyed (or hurt or whatever you honestly feel)." Then you can ask her what you want of her, too. This way of communicating will make you feel better and you will also be seen as a sensitive guy which many women like. I may have not given the best example but I couldn't think of another one, sorry.
Welcome here and hope you'll keep posting and reading.
<font color=green>"Each friend represents a world in us, a world not born until they arrive, and it is only by this meeting that a new world is born." Anais Nin
</font color=green>