When a negative reaction impulsively shows itself before you have been able to prevent it, make as your second thought a deliberate replacement or substitution of it, by the opposed positive one. For instance, a reaction of envy at someone's good fortune should be substituted by the thought of appreciation of the good qualities or services which may have led to it.
-- Notebooks Category 6: Emotions and Ethics > Chapter 1: Uplift Character > # 34