Stop Resentment Building?

So I made a post a couple of hours ago that I'm actually hoping most of you didn't see but the gist of it is that I was angry at a family member and wanted someone to analyse her behaviour but a kindly commentor analysed mine and told me it sounds like I let resentment build and it clouded my judgement on the whole thing. That was completely right, after I realised that I took a look at my behaviour and realised the situation wasn't that bad I was just holding onto pre-existing anger and I was working off that feeling instead of actually perceiving the situation. And just like that I was immediately embarrassed by the post and killed it.

I hate that in a good way, in a post made by me I was so resentful that it was obvious I was the problem. I needed the perspective change. I've actually been prone to holding on to resentment my whole life and I don't realise it until someone points it out then I see how it's influenced my reactions. And I think it's getting worse as I get older and more tired.

Does anyone have any advice on how to stop it before it starts? Or how to identify resentment building so you can check yourself?