They are called coping mechanisms. Coping mechanisms are essentialy structured and specific ways how you deal with a past event that caused an unpleasant emotion (such as anger or sadness) or just structured ways how you can learn to deal with certain situations.
There are many coping mechanisms, some involve more emphasis on going through the event or emotion and asking yourself what caused it and how to deal with it, while other involve being more 'in tune' with your feelings and acknowledging how you feel :)