How to take your toxic ways out of your system?

I’ve been in a relationship for 3 years, and I’ve picked up toxic ways when I know they aren’t the best for my relationship. I’m trying to change the way I feel and think about things. I’m tired of bringing the toxicity into my relationship. Please anybody, any advice or tips? I love this man... and I don’t want to hurt or lose him.