that sounds really tough OP, I’m so sorry. It’s relentless when you’re dealing with this kind of thing by yourself but I promise everything is a phase and it will pass.
Self regulation per above advice (when you have the energy needed for it) is helpful. As is letting some of it go. In case it is helpful have you tried any of the following…
Talking about bedtime routine at a different time when it’s not actually happening (eg. Saturday morning) and ask about her fears and reassure her. Validate her feelings, while reassuring her. (ie. It’s ok to feel afraid of the dark, what is scary about it for you? And then reassure on the things she brings up)
Discuss what the routine is and what she might do (eg. Put pyjamas on), what you’ll do together (teeth, story etc) and also what you’ll do after she’s in bed as part of it. Commit to checking on her in between activities (eg. Mummy is going to tidy the kitchen and then I will check on you, then I’m going to do the laundry and then I’ll check on you, and so on.)
Have you tried doing a version of it with her favourite toy, but during the day? Eg. When it’s bedtime we are going to do X things, let’s try it with your bear. Then let’s leave the bear while we go and have a snack, then let’s check on him so he knows we are still here.
Have a bedtime plan and sticking to it - I found the thing of sitting outside the door for a while after stories/song/cuddle worked quite well (I used to read my kindle) After a few days I could creep away quicker and quicker because they settled faster over time.
Also do you still use a baby monitor? Mine has a walkie talkie feature, so if my little one asks for me I can reassure them that I’m close by and I’ll be up in a minute (or not) without having to go there.
Recommend reading The Owl Who Was Afraid of the Dark by Jill Tomlinson with her.
My DD used to get into my bed in the middle of the night from around the same age. I just let it go (tbh I was so tired I often didn’t even realise she had done it until the morning). About a year later she stopped doing it just as suddenly as she had started. It did affect my sleep having her there (I realised afterwards) but I think, because I didn’t fight it, I relaxed enough to get at least enough poor quality sleep to survive!
I hope there’s something in the above that’s useful, but just know that all you can really do is be as patient as you have it in you to be - and ask for help if you have anyone around to be of some support to you. Even just having a friend to call once she’s in bed to complain about how long it took, or staying the night with friends together, and knowing there are other adults to talk to after, can help relieve a little bit of the pressure.
I’m sorry you’re going through this, and that there probably isn’t a silver bullet. But I promise it will get better 💐 (Also sorry this is so long!)