Positive Change.
Thanks for this sharing, it can't be easy to share such intimate things with people on an internet forum that you do not know personally. It shows that a Dharma community, even on a forum gives the opportunity for us to speak with trust, be understood with compassion and replied to with care.
Your story is a story of disappointments and anger.
Your friend was disappointed at himself obviously and your "success" made him feel worse, he identified you as a cause participating to his feeling of disappointment and his mind got entangled in this thoughts that, perhaps, if he'd hurt you, his feeling of disappointment would be lessened.
That friend did hit you because he was unhappy, because he thought that hurting you would attenuate his feeling of unhappiness, would calm down is mind poisoned by anger.
This never works.
You, on the other side, were unhappy also at seeing your friend unhappy, you maybe did not understand all the reasons why he was unhappy, and when you got hit by him, you saw him succeed at extending his insecurity, his disappointment and FEAR onto you. Suddenly you had to taste his anger physically. And it made you cry. Why? because when someone we expect love from is willingly engaging in actions to hurt us, physically or mentally, we feel un-loved, we feel abandoned, we feel lonely, we feel destroyed, we feel betrayed, but because we love the person, we feel un-worthy, and we think that maybe the fault was mine and we develop guilt.
As a result, we try to fix the problem from a totally wrong understanding of its causes. And it never works.
I am glad that you met the Dharma, for it presents us with solutions that are more long-term, more extensive and more profound than psychology, and I say this without a mind of putting down psychology.
Anger, disappointment ans guilt are also emotions that can be dealt with with the help of a psychologist or psychoanalyst, but to broaden their understanding and therefore broaden up the healing, our best therapist remains Buddha Shakyamuni.