I've done terrible things in my life. I can't get over it. Is it affecting my mental health?

Long-term guilt. Long-term guilt about things we've done can surely affect all parts of life -- including mental health. Guilt can serve a useful purpose when it alerts us to having harmed others; we can make amends and change behavior so as not to repeat the hurt. It requires acknowledging & processing our actions & results inwardly -- perhaps outward apology too. Working with a therapist can help w/this.
Counselling. You need to see a mental health professional. You need evaluation and possible treatment.