Sometimes we're surprised when our old nature seems to come out of the cage (so to speak) and overwhelms us but we shouldn't be.
When we give our lives to Christ, His Spirit comes to live within us and begins to change us from within. He changes the way we act, and He also changes the way we think. But our old sinful nature is still alive, and if we aren't careful it will assert itself and try to cancel what God is doing. Even the Apostle Paul experienced this ongoing battle: "For what I do is not the good I want to do; no, the evil I do not want to do this I keep on doing" (Romans 7:19). We'll never be perfect in this life.
Seek God's forgiveness for what you did, and ask Him to keep you so close to Christ that it won't happen again. Then go to the person with whom you got angry, and humbly ask that person's forgiveness. Don't let this problem remain unresolved; it will only fester and get worse. The Bible says, "Bear with each other and forgive whatever grievances you may have against one another" (Colossians 3:13).
Then pray that God will help you be a better witness for Christ both by your words and by the way you live. Don't let this incident discourage you; God may even use it to show others how much Christ means to you.