I have done this twice now (I'm not a bad person, I promise!), mainly because I like to be a decent person. Part of that is that you sometimes realise that some behaviour/remark you expressed a while ago, wasn't the best of plans. It's a part of developing :)
My aproach is to keep it as simple as possible, I find that way its easier to bring it up. If I come up with some elaborate complex plan to talk, making sure everything is perfect, I know I won't bring it up when I want to, but when its simple its easier to start the conversation.
Hey X,
I know it has been a while, but I'd like to apologize for {EVENT}. I scolded at you while you were actually correct, I should not have done that. So my apologies.
Doesn't have to be more than that, stick to the minimum. They will respond to you and from that point the conversation will continue. Either good or bad. Just because you said you're sorry, doesnt mean its OK for them! It might take a while or not happen at all.
In both my situations the other person was surprised and then appreciative. One told me she had a lot of resentment towards me for {Behaviour} and that resentment disappeared over night :)
There is a significant part two to this aproach: Don't do it again. The apology only works if you actually mean it. If you do it again, it ment nothing. But as the current situation is bothering you, I'm assuming you already try not to.
Some examples:
Hey X,
I just wanted to apologize for {Event}. Looking back at it, I didnt handle that correctly, sorry.
Hey X,
In retrospect I noticed {action} wasn't very respectful, I did not mean to, apologies.
Hey X,
I'd like to say I dont think I was as suportive as I should've been. I know it's history, but I wanted to let you know that if I can help you now, please let me know :)