Personally, I see that humor is considered the best defense mechanism to the extent that it consists of an unexpected reassessment of the demands of reality that reverses the painful emotional tone, thus offering his triumphant self that pleasure gain through which he displays an invincible narcissism.
According to FREUD: "Humor does not resign itself, it challenges"
Unlike the comic and the spirit, or the irony, which aims at the drive and aggressive satisfaction and require the actual presence of a real third to be accomplished, it is a question of a process of strictly intrapsychic secondarization aimed at the economy: namely the saving of painful affects (pity, irritation, anger, suffering, disgust, tenderness, horror, etc.) that the situation should cause and whose energy thus subtracted is transformed into this moderate pleasure but victorious, far from the hilarious discharge, that is the smile of humor.
Humor would be beneficial: he is not resigned but creates a challenge. The ego refuses to let itself be offended and compelled by suffering. It is the triumph of the self and the pleasure principle. Thus, humor is linked to dignity: the subject recreates an image worthy of himself through the reconquest of humor.
Interesting question, I think there are lots of psychological defense mechanisms that are quite fascinating but the one which stands out the most for me is anticipation.
Anticipation, from the word itself is imagining or rehearsing possible events and outcomes in a particular stressful situation. For example,you are about to take a difficult test and you are afraid that you will have a failing grade about that subject. In order to cope up with this, you imagine scenarios or you anticipate that you will fail and find ways how to deal with it, just like imagining how you solved this problem in the past or telling yourself that you can still redeem your bad score on the next exam.
Also, anticipation brings excitement when dealt with future positive events. For example, you are anticipating on getting a new gadget, you will feel extreme excitement while waiting for the day to come.
I find it fascinating in a way that one tends to reassure one's self that there can be solutions to problems if you deal with it even before it comes. I usually do this in so many things, when I am about to experience a stressful event, I tend to plan and fix the problem even before it comes because it helps me stay calm and at ease.
I hope my answer helps!
I actually have to fake it but then it works.
What it does is that it helps takes away the power of the other party/event. It helps with bullies/blackmail. When people try to use things/threats to make me carry our their wishes, I tell myself that leverage doesn't matter to me
When bad stuff happen to me, I tell myself it doesn't matter. That way it doesn't hurt as much
Later on in the day, or at some other time, I would remember the event and feel the grief. But then it doesn't hurt as much as it would at the time it happened.