Oh that's a classic, don't worry.
Unfortunately I, you and we all have some flaws and insecurities that are a party breaker in term of relationship.
(Alr ima yap alot because I've lived (pretty much) the same thing, sorry about that ._.')
So, identify them, check every time it appears and try to stop them before it creates a situation. From my experience, it's putting yourself in uncomfortables situation, or at least new ones. It's taking new habits, and overthinkingon when you're in the wrong or in the right. And it takes aWHILE, bad habits are hard to get rid off.
But people will appreciate just the fact that you're trying. You don't need to be perfect immediately. If you apologize and do your best, people will see you as a great person.
At least that's how I lived it.
I hope it works for that :D