The correct answer is Sublimation
Sublimation as a defense mechanism is the transformation of unwanted impulses into something less harmful. This can simply be a release from distraction or it can be a constructive and valuable piece of work.
When we are confronted with the dissonance of uncomfortable thoughts, we create psychic energy. This has to go somewhere. Sublimation channels take this energy away from destructive acts towards something that is socially acceptable and / or creatively effective.