Your daughter's behaviour is probably the result of some deep seated insecurity or anxiety, which has probably resulted from your separation. What you have been doing so far is good, and I think you should augment things a little by generally trying to build up her self confidence by ensuring that she is given lots of physical and verbal love, and that all her little successes are acknowledged.
In purely practical terms it often helps if, just before bedtime, you can take her round the house to show her that everything is secured, and that there are no strangers inside, and that they cannot get in. It’s even more helpful if at that point you can get her to verbally agree with you that that is a fact, that it’s real – that will help set up a more positive mindset.
Also tell her that when she goes to sleep, you will come in to check that she is alright in five minutes – and do so. After doing this a couple of times she will probably drop off in to a natural sleep. Be aware, however, that she will try to stay awake at the very start to make sure you will do what you say – so keep your promise!
Best wishes, NorrieM