self-consolation — The act of comforting or soothing one's mind by oneself.
masturbation — The act of feeling sexual pleasure by stimulating one's genitals by oneself.