Really sorry to hear that. But be the better person and think rationally. Let the other person know that this was not ok behavior. If this has been a pattern then smile and act calm and start to look for a new job.
I know you have traveled far but trust me in retrospect everything will make sense. Just act smartly and not emotionally. But i understand the anger i would get if i am shouted upon.
my motivation is just as they are mine teammate so its part of my job to be helpful without expecting things in return but i see them showing gratitude towards other team-mates and it kinda start to make me think.
I guess my help is not that life changing to warrant a public gratitude.