How to deal with insults?
There's a canonical answer here -- Akkosa Sutta: Insult (SN 7.2)
In the same way, brahman, that with which you have insulted me, who is not insulting; that with which you have taunted me, who is not taunting; that with which you have berated me, who is not berating: that I don't accept from you. It's all yours, brahman. It's all yours.
Whoever returns insult to one who is insulting, returns taunts to one who is taunting, returns a berating to one who is berating, is said to be eating together, sharing company, with that person. But I am neither eating together nor sharing your company, brahman. It's all yours. It's all yours.
I think that's great and maybe needs no explanation.
To try to explain it anyway, though, I think that means you deal with them by not partaking with them, not sharing them, maybe by seeing them as owned by (intended by, the kamma of) the person who produces them.
Possibly that's not the same as denying them, though:
- Because it can be good to learn from criticism?
- Because the Zen story Is That So? shows the master acting on reality and doing what's necessary even when he doesn't necessarily agree with the accusation?
I want to ask how to deal with memories of past insulting behavior by others towards me?
Memories of trauma can be difficult, in an extreme they lead to cases like PTSD
In the typical case, the individual with PTSD persistently avoids trauma-related thoughts and emotions, and discussion of the traumatic event, and may even have amnesia of the event. However, the event is commonly relived by the individual through intrusive, recurrent recollections, [etc.]
I guess stressful experiences are memorable, perhaps for evolutionary/survival (i.e. biological) reasons.
One therapy is to maintain mindfulness of the present -- e.g. breathing, meditating, whatever your object of concentration is, or whatever your other senses can be conscious of -- to learn that "in reality" the past is past and you are not being insulted any more.
Aside from that there are a few aspects of Buddhist doctrine that are useful in most circumstances:
Four noble truths -- suffering is a result of craving for something to be other than as it is
Anatta, non-self -- instead of "me and mine" you have the view that "there was that person, with some experience, some feelings", but all transient
Dependent arising -- you said, "my own behavior was also responsible for me getting insulted", but now the circumstances are different, you're not behaving like that any more
Morality -- maybe try to not behave like a person who people would want to insult
Good-will etc. -- see the first 6 or so verses of the Dhammapada ...
- Mind precedes all mental states. Mind is their chief; they are all mind-wrought. If with an impure mind a person speaks or acts suffering follows him like the wheel that follows the foot of the ox.
- Mind precedes all mental states. Mind is their chief; they are all mind-wrought. If with a pure mind a person speaks or acts happiness follows him like his never-departing shadow.
- "He abused me, he struck me, he overpowered me, he robbed me." Those who harbor such thoughts do not still their hatred.
- "He abused me, he struck me, he overpowered me, he robbed me." Those who do not harbor such thoughts still their hatred.
- Hatred is never appeased by hatred in this world. By non-hatred alone is hatred appeased. This is a law eternal.
- There are those who do not realize that one day we all must die. But those who do realize this settle their quarrels.
... and maybe doctrine about the brahmaviharas for further details.