The so-called "adultery" and child custody

I have been married for eight years and I have a seven year old daughter. Due to constant physical, emotional and social harassment by my husband, I decided to part ways with him about 1.5 years back. My decision was primarily based on the emotional impact on both myself and my daughter who was growing up witnessing harassment and abuse to her mother on a regular basis. But for an initial period of six months he refused to heed my request to part ways on mutual consent. In the last one year, I met another person and fell in love with him. We were planning to wait it out, finish my divorce proceedings and take our relationship forward. But my husband who has always stalked me online and otherwise hacked my Facebook and found some chats of me confessing love to the other person. When he confronted me, I told him the truth and asked him to let me out of this relationship as it is toxic not just for both of us, but more importantly for our child. But despite all these developments, he still refuses to sign divorce on mutual consent. He has declared with everyone known to us that he will make me suffer by not granting me divorce and not letting me go ahead in life and find peace and prosperity. When my parents spoke to him to take the divorce forward so that everyone can find peace, he told them that it was only possible if he gets primary custody of our daughter. In the last seven years since the birth of my child, he has been a remote parent. His role has been restricted to paying for her education and buying her stuff. There is not a slightest chance of him being even able to comprehend her needs, emotional or otherwise. Despite all my differences with him and a horrible past of being assaulted by him, I am willing to let him spend as much time he wants with our child. This is considering my child's need for her father to be present in her life. But he at the same time is trying to use my child as a weapon against me and my life choices. Please advice if he will be able to get primary child custody in such a circumstance. And is there anything I can do to ensure my child is not affected in this ruthless battle. Thanks!