All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger. We ask Allaah to exalt his mention as well as that of his family and all his companions.
You have committed a major sin which is strongly condemned in Islam. Fornication is a shameful and obnoxious act while adultery is much worse and horrid.
But the door of repentance is opened wide for every person as long as he/she does not face the agony of death. So, you have to make sincere repentance from this sin immediately. To know how to make repentance refer to the Fataawa: 81467 and 83904.
For more details about the ruling of adultery read the Fataawa: 88138 and 88978.
Allaah knows best.