The Rebbe's guidance on doing teshuvah — returning to G-d after one has done wrong:
It is always possible. Nothing stands in the way of teshuvah (IK 3898). Whatever one's past, through teshuvah one can reach the level of a beinoni or even a tzaddik (IK 3306). Every Jew has an inner light that can always rise higher, however distant he feels (IK 5064, 8837). Nothing is ever irreparably lost — as Pesach Sheni and the leap year show, what was missed can be made up (IK 8816, 10693, 10707).
What it takes. Teshuvah means sincere regret for the past and a firm resolution for the future (IK 853, 3898, 8979, 10970), with a real commitment not to repeat the wrong; when that is present, G-d's forgiveness is complete (IK 7386). But repeated wrongdoing makes true teshuvah harder, so it must not be taken lightly (IK 4621); the Zohar speaks of the obligation to return, not of guaranteed forgiveness (IK 5172). Acknowledge faults honestly rather than defending them (IK 10660).
Regret must lead to action. Real regret energizes positive action; if it leads to sadness and paralysis, it is not the right kind (IK 10138). Follow it at once with deeds — more Torah study, mitzvos, and inspiring others (IK 853, 2410, 6284). Embarrassment over the past should spur steady practical improvement (IK 4127). We can't change the past, but every moment ahead has infinite value (IK 2919).
No despair. Despair has no place in Jewish life, because teshuvah is always possible (IK 6101, 7531). Despair about one's spiritual state comes from the yetzer hara, not the truth (IK 1718, 7459). A setback is a reason for renewed effort (IK 3354, 8320), and a descent is meant to lead to a greater ascent (IK 4640). Take stock honestly at year's end, without falling into despair (IK 4739).
Teshuvah from love transforms the past. Teshuvah out of love doesn't only erase past wrongs — it turns them into merits and brings healing (IK 1917, 7083, 7441, 9370), and it reaches the deepest levels (IK 4955).
See also: Teshuvah – Fasting, self-affliction and the Chabad approach; Teshuvah – Rectifying specific wrongs.