Separely living but as friends, now wife wants divorce as i have an affair. I want to avoid divorce

Hi, im a 45 year old man married for 15 years. But after 5 years of marriage a son later, my wife walked out of home because of issues with my mom and sister. Mine is a joint family. She went on to live with her parents in the same city. She never returned home though i persistently called her, begged her. She wanted a separate home but I refused to leave my old parents. We are very well off, wife is a big officer too. Though we were living separately, we would meet occasionally, talk. This went on for a few years. Later she restricted me from meeting my son who is now 12 years old. So i had to shift to her parents home and i lived there for 2 years. She was happy, son was happy though we never really got back as husband and wife. Unfortunately, my dad died and I had to return to my old ailing mom. So i begged my wife to return home as there was no one to trouble her at home. But she refused to come to my home but she kept in touch with me. But meeting my son was banned and i was so terribly hurt as I had no family life. Last year my son wanted to go a holiday so we even went abroad on a holiday for him. But she later banned me fro meeting my son again though he was missing me. Its been 1 year since i saw or spoke to him. But she keeps talking to me whenever she needs help and I do the same. I still keep requesting to return but she doesnt. Somewhere after she left, i got into an affair with a married woman who is separated ( not divorced yet) from her hubby. I really loved her and was in full fledged affair without the knowledge of my wife. I know its cheating but then I had no physical, emotional relationship with my wife since she left. I kept begging her to come home in the hope of starting a new life but she never did so I continued my affair with the woman i loved. Now suddenly my wife came to know of the affair, got hold of all mails and pics my lover and I exchanged and now threatening me for a divorce.I dont want to give her divorce as i really want to try a new life with her. But she is very furious that she was kept in dark for 5 years of affair. I dont know what to do and convince her not to give divorce. I tried to tell her that we should start a new life but she is very angry after knowing the intimate details of my affair and is refusing to excuse me. I thought of counselling but I dont think she will come for counselling. She doesnt let me meet my son for months and years unless there is a need like marriage, functions. He cries for me but she doesnt let him see me. Surprisingly, she talks/chats with me and we went on a holiday to Dubai 2 years ago as my son cried for it. I still help her with issues and she does the same. But she refuses to live with me. Now she is hurt about the affair or her ego is hurt because she couldnt accept that a man who begs her to return has affair. how can i avoid divorce?