After two years there is no "just stop." After two years there are likely emotions involved as wel as the destructive need for sex. and after two years you can't just expect to stop and go back to your relationship without telling him anything. At some point the truth will come out, either because you can't live with it any more, or because you find yourself back in a position where you are drawn to someone else. If this affair doesn't get found out then the next one will or the one after that.
And if you keep this a secret it will make it so much easier to have an affair next time, because you got away with it this time.
Your relationship with your partner is over. He doesn't know it yet, but even if you were to come clean, it can never be the same again.
You need to look at why you've felt the need to carry on an affair for two years. Where do you see this going? Do you want to be with him? Want to leave your partner for him? Introduce him to your child? And if not, why not?
And bear in mind that even if you leave the marriage, the legacy of the affair will never go away. You may find a new relationship, and you may never be able to envisage cheating on that partner, and when you hear about people who do cheat you will realise that you were that person once. Having an affair doesn't just go away, you may move on from it but it will stay with you if you are inherently a decent person. You don't just betray and hurt people like that and just get to move forward with your own life, not even if you bitterly regret your actions.
You can move on from this, end the affair and end your relationship with your partner, and sort your life out before embarking on any more relationships. But first you need to ask yourself why it is you are in such a self destruct.