Boyfriend acting like I cheated when I DIDNT 😥

I need some opinions ladies 😭 it's long but pls read if you're good at advice I need it 😅

My boyfriend struggles with mental illness and is figuring out his treatment plan, it's lots of ups and downs.

I slept with a mutual friend BEFORE I knew my bf, and was afraid to tell him. My friends said I didn't have to, it was none of his business what I did before him, so I denied it when he asked.

The mutual friend literally went nuts and started threatening me if I told anyone, wanted me back, all this stressful shit, so I didn't tell him for months. When I did, he treated me like I cheated on him. I know I should have told him. I feel awful.

It's been 6 months of ups and downs since, and I love him to pieces. We are so good together mostly. He isn't on a good medication for his depression yet, and it's been bad recently.

He won't have sex with me because he feels uncomfortable. He almost broke up with me crying "I love you but I can't stop thinking about it"

When I confront him about something, he turns it around and I end up saying sorry.

He has no energy bc of depression and is so used to me babying him, but I haven't been getting much attention or love back.

I have some codependency and serious over empathetic issues lol so I have been going along with it.

The no sex thing makes me feel so guilty and disgusting and unattractive suspicious. Yo i sneak my vibrator in the shower with me it's been ROUGH.

I love him and really want to wait to see when his mental health does improve, what things would be like, but it's killing me. The idea of breaking up kills me. I'm not sure what to do :(