I think that you do need to step away, with your daughter, to protect yourselves physically and emotionally. While you may care very deeply for your husband, it does not sound as if he has much control over his impulses & they're pretty dark. That is a big problem.
We all get dark thoughts every once in a while ~ but they're just that, thoughts. Your husband is getting these dark thoughts very frequently, and it sounds as though he is having a very difficult time understanding that they're just thoughts...impulses...and they needn't be acted upon. They shouldn't be acted upon ~ got to take a step back and think about why these dark thoughts keep coming. He needs to look into this tendency and work upon how he reacts to general stress in life. Preferably, he should also show this improvement in emotional state of mind for a significant period of time (6 months-1 year) before trusting him enough to move back in with him & be a regular part of his life again.
In my humble opinion, it sounds as though your husband really needs this time to work upon himself: full-time. You can still talk on the phone, online, and short meetings in parks (around other people & your child) as he gets better. I just really believe that you need to take your daughter's and your security first. That must be #1.
Very gentle hugs to you and your family. Best wishes!