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.
There is no doubt that the affairs that you had after marriage are major great sins, so you have to repent to Allaah. You have to know also that whoever repents to Allaah, Allaah accepts his repentance, and His Mercy is vast, therefore you should not despair of His Mercy. Allaah says (interpretation of meaning): {And verily, I am indeed Forgiving to him who repents, believes (in My Oneness, and associates none in worship with Me) and does righteous good deeds, and then remains constant in doing them, (till his death).}[20:82]. So you have to think good of Allaah and perform righteous deeds in the future and avoid any means that could lead to temptation again and conceal your sin and do not inform anybody at all about it, even your husband.
As regards the stress that you are suffering from, you can consult a trustworthy psychologist. It could also be a Jinn or the like, so you have to seek Ruqyah from the Book of Allaah and the Sunnah, and the supplications and remembrance. In this matter you can seek the help of a righteous person while observing the religious requirements like wearing Hijab and not being alone with him if he is a marriageable man. The best way of seeking treatment is to be steadfast on the religion of Allaah especially wearing Hijab and observing the obligations and continue to recite of the morning and evening special supplications.
Allaah knows best.