How to unlearn behaviors from a toxic relationship ? 🥲

I was with my ex for a little over 4 years, we started dating when I was 16 and he was 20, and we have two kids together. It was a nightmare - he cheated a bunch, always run off, was insanely jealous, was highly manipulative, physically abused me while I was 37 weeks pregnant and at risk of premature birth, threatened to kill me, threw out a bunch of the kids’ stuff, punched holes in the wall, fell out of the kids’ lives 4 months ago, etc. I started dating a guy I work with a couple weeks ago and everything seems okay. He shows a lot of green flags, is super gentle, sweet, caring, etc. But I notice that I definitely hold onto toxic behaviors that my ex taught me to carry. For example, my ex was jealous enough that if I even spent time with a dude friend, he would threaten to harm them or kill me. Well my boyfriend is friends with another girl we work with - she has kids and a fiance. They joke and talk sometimes and we all have each other on Facebook. I don’t feel deep down that it’s anything sneaky, but I do sometimes get jealous and don’t like it. How do I unlearn this?