How can a young man keep his way pure? By guarding it according to your word.
Psalm 119:9
Sometimes things happen to us, situations, people that push us to lose our patience and thus sin. Sin against that person, but more importantly sin against God. Whatever the person did, said, or whatever the situation it always comes back to us. We are the ones that sin. The Lord has given us His word, His Holy Spirit, now our responsibility is to read and guard His word in our hearts, to be filled with His Holy Spirit, to die to self daily and renew our minds daily, so that in the time of testing we may stand still by God's grace and not fall into sin. So you know that when you do lose patience and sin, the problem is not the other person or the situation the problem is lack in our part. The solution? Read God's word for the renewal of our mind, die to self, let the Holy Spirit fill us, but most importantly and before doing all that, Repent. Apologize to the person (you have to mean it, if you don't then you need to pray to the Lord to remove that pride from your heart, which is also a sin sometimes the root of the problem), see to it that you don't do it again and apologize to the Lord. Finally, remember that our Lord Jesus Christ endured it all yet Isaiah tells us that:
"He was oppressed, and he was afflicted, yet he opened not his mouth; like a lamb that is led to the slaughter, and like a sheep that before its shearers is silent, so he opened not his mouth." Isaiah 53:7
Remember:
"Love your enemies, do good to those who hate you, bless those who curse you, pray for those who abuse you. To one who strikes you on the cheek, offer the other also, and from one who takes away your cloak do not withhold your tunic either." Luke 6:27-29
And Finally:
Therefore let anyone who thinks that he stands take heed lest he fall.
1 Cor 10:12