The Rebbe's guidance on living with joy and lifting oneself out of sadness (IK = Igros Kodesh letter number):
Joy is an obligation, not a luxury. Serving G-d with joy is both a chassidic ideal and a halachic obligation, and it applies to every part of life, not only prayer and study (IK 3451, 3530, 5551) — in eating, relaxation and daily activities, with song (IK 2935, 6527). Even someone who has seen open miracles must work to live with faith and happiness rather than depression (IK 2550). Happiness comes through observing Torah and trusting in G-d (IK 6263, 984); accept the yoke of Torah and mitzvos with joy (IK 2250, 7611). Joy in being a Jew (IK 1380).
Sadness is a tactic of the yetzer hara. Sadness usually has no real basis; recognize it as a tactic to hold you back, and answer it with joyful action and trust in Divine Providence (IK 3079, 6648, 2540). Don't dwell on past sadness (IK 8913) or on memories of past mistakes (IK 7221). Avoid sadness altogether and focus on gratitude for the blessings you have (IK 3050, 7744, 4049). Spiritual accounting must not lead to despair (IK 2317); on discontent with one's spiritual state and the path to joyful service, see IK 3760. For Holocaust survivors facing depression, the Rebbe urged joy and faith (IK 2892).
Where joy comes from. Joy grows from knowing that we are G-d's children under His constant care (IK 3351, 907), and from contemplating the privilege of doing His mitzvos (IK 7107). It can be reached by willpower and by reflecting on the Tanya's teachings (IK 2952, 3797, 5643); even brief daily study of Shaar HaBitachon lifts sadness (IK 3493). Learning Chassidus and turning to trusted friends raise one's mood (IK 4142, 5481); fifteen minutes of self-reflection paired with joyful service (IK 1541). Changing one's perspective brings joy to one's surroundings as well (IK 8482).
Small steps. Bitterness can be overcome with small but steady steps, such as short daily periods of Torah study undertaken with determination (IK 2934). Joy and Torah learned by heart are powerful tools against negative and confusing thoughts (IK 6087b, 6600, 5170), and positive thinking is not escapism but a way of living meaningfully (IK 3766, 7613, 2617).
Joy in hard times. Joy is especially needed during illness and setbacks, together with medical care (IK 1459, 3336, 4994, 8370). Trust in G-d together with genuine joy opens channels for healing and success (IK 8235, 10355, 1599, 1553). Keep joy through delays and material and spiritual challenges (IK 1444, 7415, 3851). Self-examination and even teshuvah should be done with joy (IK 5754, 6513, 6122); after a descent comes elevation (IK 4640). On joy after the loss of a wife, see IK 1099.
Joy in one's work. Holy work — outreach, teaching, communal service, writing — should be done with joy, not a sense of failure (IK 1726, 2961, 3586, 4691, 4916, 7666, 8300); don't be disappointed by a small turnout (IK 3157). Choose work that aligns with one's will and joy (IK 5850). A farbrengen always has an effect, even if results come later (IK 2692).
Joy breaks through barriers. True joy, especially in mitzvos, breaks through every obstacle (IK 1236, 2500, 2518, 1962). The joy of the festivals is meant to carry through the whole year (IK 782, 6113, 10772, 3660, 8229, 2563): the increased joy of Adar and Purim (IK 1443, 1454, 7232, 7586, 8008), receiving the Torah on Shavuos with joy (IK 1610, 1624, 4422, 8428), the triple joy of Sukkos and Simchas Torah (IK 532, 783), and Yud-Tes Kislev (IK 5967). See the holiday pages for more.
See also: Bitachon – Worry, fear and anxiety; Bitachon – Recognizing G-d's kindness and giving thanks; Health – Anxiety, depression, nerves and sleep; Emotional well-being – Personal challenges (general); Shabbos and holidays – Purim and Adar.