When you find states of mind, feelings, and thoughts that bother you coming up again and again, these become the perfect target for you to address and remove from the fabric of your mind. This is a project you’ll undertake when you finally come to a point where something has been bothering you for so long that you decide you’re going to get to the bottom of it no matter what.
The sword of discrimination is the best way to remove these poisons from your system and extinguish them; take a ray of the light of the Bodhicitta, form it into a sword, and strike precisely at the poison’s heart as if you were using a laser. Dealing with these very subtle poisons at the level of the mind when they first take form as a vibration is a skill you will develop. They’ll have a form and feeling; emotional content and memory is attached to them.
This is something you should do a little bit every day. Make it a part of your meditation to deal with this kind of problem solving; you’ll have phases where this will be all you’ll do for an hour a day for an entire week. This is something you will have to do regularly; it’s not like you’ll ever come to the end of it.