I had commited a sin again and again and didn't think about islamic laws while doing it, but after some months Allah punished me by taking away the most important person of mylife(she hate me for my past but she was not in contact with me at that time). And when Allah punished me i realized my mistake and i did toba and repented. Is it possible that i will be forgiven and that person come back to my life? Is the repentence accepted after getting punishment?
A simple answer to your question. Allah says in his glorious Quran
Say, "O My servants who have transgressed against themselves [by sinning], do not despair of the mercy of Allāh. Indeed, Allāh forgives all sins. Indeed, it is He who is the Forgiving, the Merciful." - For those who repent and correct themselves. (Surat al-Zumar: 53)
But don't expect the one that already gone to akhira (to hereafter) to come again until Allah resurrects as all in the day of gudgement. But still, you can send her a good deeds. by giving charity on behalf of her. By intending to give for her. By making dua for her. and so on.