We encourage you to first have her apologize to her friend and promise that this will never happen again. That is the first step in mending the friendship. Then you must concentrate your energy on teaching her what she can do the next time she gets frustrated or angry with a friend.
Ask her to think of a better way to handle it. If her suggestion is acceptable, go with it. If not, make a suggestion yourself. Provide her with a good reason for doing this (to help her make and keep friends). Then help her practice the skill.
Pretend to be her friend who is doing something upsetting. Have her use her new skill to resolve the situation that before would have made her want to physically lash out. Reinforce her attempts at practicing by praising her efforts. If she needs more practice, provide that opportunity.
Remember that our children’s misbehaviors provide us with teaching moments. If that is our focus, we are less likely to get overly upset ourselves.