Divorce and child custody

I got married in 2012 and after 1 year of marriage my husband start abusing me. Once he hits me badly and I was 3 months pregnant and after than I met miscarriage. These behaviour of my husband continues and after 3 yrs of marriage we were blessed with baby boy in 2015. During that period of pregnancy h misbehaved my times even didn't went to the doctor also. But somehow i feel like may be after becoming father he changes this behaviour but all in vein. After delivering my child when I came back to my home, I got to know that my husband has extra marital affair. When I asked him to stop all this he somehow convinced me by taking swear of his child. Than for 5 months things are going normal. But one day i got to know that he is still connected to that lady and Whenever I asked him to stay away from that lady he keeps on beating me and in reverse he misbehaved and starts defaming my character in front of his family. With his father and cousions. Things became worst day by day that misbehaving becomes social also. One day when my child saw all this somehow I collected my feelings and decided to move out from that marriage. I take my child along with me and come back to my place on 2019. Than after 2 months his father came and assures my father that he will take care of things and this will never happen again. We somehow convenced and I decided to give again 1 more chance. For sometime things are going fine but again he started misbehaving. Than I have decided to take help of marriage counsellor. Somehow i managed to convince my husband. But he attended 4 sessions and on last session he misbehaves and start shouting in front of counsellor and leave the session. Than my counsellor helped me to give me individual session for my wellbeing, she mentioned thatmy husband has Bipolar disorder. I have decided to move out from that Marriage and start staying with my parents on 2021. Slowly gradually I start working and taking care of my child all by myself. My son is settled with my parents and my brother and we all take care of his education and health and wellbeing properly. Now my husband wanted my son's custody and my in laws are Approaching me since 1 year. I tried to finish everything mutually but these all people want child custody. For the sake of my child wellbeing I wanted to keep my child with me and wanted a full custody of my child. Kindly assist and help what best procedure I can go for.