Divorce and child custody

I am married for 8 yrs with a child aged 3 yrs. I and my wife were living separately for job purposes. I am a physiotherapist by profession, my wife works in a bank since marriage. my wife has been wanted a divorce since marriage even after a small argument. She does not like my family and never participates in family responsibilities. We have no bonding, she does not respect my parents and never listened to me. a few years back I met an old friend, I got engaged with her mentally and physically. later, she got pregnant and she decided to raise the child as a single parent but I gave my name on the birth certificate of the child. later, I moved to New Zealand but still, I am in touch with that lady telephonically because I feel an attachment with the child, and also I support her financially in raising the child. I had no intention to leave my wife and child. but when my wife visited me here in New Zealand she got my chat on the phone and read my mail and kept it as proof. I tried several times to make her understand and try to clear everything but she started humiliating me. when she returned to India after some time she left my child at her parent's house in Ajmer and continue her job in Jaipur in spite of saying my parents that they can look after my son she was not ready and stop receiving phone of my parents as well as mine. She also threatens my parents that she will file a police complaint against them and get them jailed. She does not allow my parents to meet with their grandson. Now in that situation, She kept my son and did not allow me to see my child even. My only question is shall I be able to get custody of my child after divorce? what will be the consequences..will it hamper to get the child custody? is she can file a police complaint? she has not given me any divorce notice yet. as still I am in New Zealand and please suggest to me, can this affect my work visa as well? thank you