A suicide case was filled under 302

My gf was staying in my house for last 5 month . We were committed to get married. She was divorced and I too. Her father house is in same area. All they including area people know that she staying with me. That day, we had a fight. She initiated and hit me first and bite my arm . Anyway i released and i hit her few with broomstick. Then i left my house to outside , and she went to another room. She then committed suicide. Next day when she did not open the door after calling for long time, i broke the door and found her hanging. Quickly i took her down and called her mother. We them took her to the hospital. She was Suffering from cervical cancer, had suicidal tendency, drugs abuser as well. Her father filled a case against me under IPC 302. I went away bcoz the crime i did not do why should i take the punishment. Viscera report is negative and post mortem report is suicidal with few strain that hit with broomstick. My questions are: 1. Can this case be solved without I get arrested or going to court? 2. Or what is the best way to finish the case ? Pls advise.