First off, whether you're the victim or the one who caused pain on someone else, you feel frustrated. Take at least a few moments to release it as much as you can. After doing such, take a bath and listen to music while focusing on yourself for a little bit. When you're finally calm, say to yourself "What am I going to do about this?"
I had a crush on a guy who works at the local store where I am. I don't know how but i offended him somehow and he began to give me cold shoulder, like for real! I threw a fit when I saw his reaction to me because of course, I didn't know what I did! I got mad at him, myself, the situation and then I quickly realized that me pouting and making a fool out of myself wasn't going to help anything. I decided that I had to give myself two options: a) stay looking like a moron while he continues to move on with his life and you continue to feel stupid or b) Decide to do something about it and move on. I chose B. I decided that the next day, I would go talk to him and figure it out and then move on with my life without him or the potential of us in it. I felt a lot better after deciding such a thing! I had to mentally and emotionally prepare myself if he decided he didn't want to talk to me about it though. He had another girl he liked that I guess he began to pursue (he actually called the girl in front of me too so when I say he totally gave cold shoulder, I'm not lying!). Either way, this was not about making him feel better, it was about me.
This process is not for the other person, it is for you. The only person who's feelings matter is your own. The better you feel the better the situation becomes. I promise! Of course time heals all wounds completely but this is what you can do for yourself at the moment and make yourself feel a lot better.
This isn't just for when you hurt someone or if someone hurt you, it's for any or every situation. If you get a bad grade, what are you going to do about it? If you mess up during a dance recital, what are you going to do about it? You have to remember that continuing to feel bad is a choice. Choose to feel good! This is your life, you make it what you want. Do not let situations and people control how you want it to go.
I hope I helped someone today! If you ever need advice, hit me up on twitter :)