If someone insults you what should you do? There is a famous story of such an encounter between the Buddha and a ‘difficult person’ named Akkosina. Akkosina’s name means “Not Getting Angry” but he was the exact opposite of his name. Akkosina was easily angered and was always angry about something or someone. When he heard that the Buddha did not get angry with anyone he immediately decided to visit him. He went up to the Buddha and scolded him for all sorts of things, insulting him and calling him awful names. At the end of this angry speech, the Buddha asked this man if he had any friends or relatives. “Yes.” Akokosina replied. “When you visit them, do you take them gifts?” the Buddha asked. “Of course, I always bring them gifts.” The angry man replied. “Then what happens if they don’t accept your gifts?” The Buddha asked. “Well I take them home and enjoy them with my own family” “And likewise,” said the Buddha, “You have brought me a gift here today that I do not accept, and so you may take that gift home to your family.”

source: Akkosa sutta (SN 7.2)

Is there more to learn from the story of the angry man? If someone insults you, it is hard to not be affected by it. So how to balance out your emotions and begin the day from a place of happiness, and how to respond in the same light?
Well actually your question has 2 different aspects,so does the Buddhism. They are 'laukika' and 'lokottara'. 

The excellency of Buddhism always goes with its 'lokottara' content, where the path to nirwana. For a person who are in lokottara track, what to do when some one scolding is just to ignore. It is all about removing tanha from our mind. If we can't hold other's scolding that's just because we have tanha on our image/social aspect or any other. 

But as most of us are just partially or not at all lakottara people, we may feel hard to do that. But at least we can behave thinking about the consequences what will be happened if we get into a counter argument/fight etc. So at least we should be able to understand that the best way to bear it is the silence and make that person convince, not to be get tempered.