Dealing with mental illness

I’ve struggled with depression and anxiety since I was a child. Ive been in a relationship for 4 years, my partner is burnt out. I cry a lot and withdraw myself mentally and physically. I don’t want to lose him, not because I am afraid to be alone but he’s stuck through at my worse and I want to stick by his side. I love this man. I feel so horrible for how I’ve treated this him in the past. I still struggle mentally.. I’ve come to terms I’m not mentally stable and have consider medications. Lexapro and lithium. But I’m terrified of side effects. Lately I feel that I don’t recognize myself anymore and rapid changing. How can I save our relationship..