I had an affair with a married woman. One day she told me that I am the father of one of her children. She even asked me to get DNA test if i doubt but i didn’t do it and instead I got away from her and left her alone in her life. it has been too many years and we dont meet at all, but I have this feeling which haunts me that she has a child who is mine. Now, i seek guidance for what I should do about that child? Do i have to leave them alone forever like how I am currently doing? Or I have any duty for the child? And how can i correct this mistake of mine? How can i get forgiveness?

According to shareeaa, the child is for the husband, except, if it was proved that he is not, like through the DNA test.
In this case, he is your illegal son, which means that if died, you do not inherit him, and vice versa.
You can not correct the mistake, but you can take the child, if she allows you to do so, or take care of his needs.
Is her husband is still with her?