Advice please

My bd cheated on me a lot in the beginning of our relationship. It’s been 2 yrs, he’s been great to me. But I still struggle to trust him and tend to say mean things. A lot! I want to change. Idk how though. Anyone else stay with a cheater ? If so how did you work on the trust part ?

Just to add, i was younger with no self esteem. That’s why I stayed. If he was to cheat again I have a backup plan and will leave. Im so much more aware of my worth than I was in the past.