Wa `alaykum As-Salamu waRahmatullahi wa Barakatuh.
In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
Dear questioner, we would like to thank you for the great confidence you place in us, and we implore Allah Almighty to help us serve His cause and render our work for His Sake.
Answering your question, Dr. Mohammad S. Alrahawan, Associate Professor at the department of Islamic Studies in English, Al-Azhar University, Egypt, states:
Committing adultery is one of the grave sins which are promised evil consequences in this life and the Hereafter. But Allah forgives all sins including adultery. Allah says in the Qur’an:
“Say, O My servants who have transgressed against themselves [by sinning], do not despair of the mercy of Allah. Indeed, Allah forgives all sins. Indeed, it is He who is the Forgiving, the Merciful.” (Az-Zumar 39:53)
As long as Allah showered His mercy on you by not revealing what you have kept secret, you should not tell your wife or anybody else about it. This is confirmed by the Prophet’s saying to Ma`iz who came and admitted that he committed adultery, “Woe be upon you, go back and ask forgiveness of Allah and turn to Him in repentance.” (Muslim)
According to the version of Abu Dawud “Ma`iz came to the Prophet (peace be upon him) and admitted [having committed adultery] four times in his presence so he ordered him to be stoned to death, but said to Huzzal: If you had covered him with your garment, it would have been better for you. (Abu Dawud, it has been graded as a weak narration.)
Based on those reports, scholars maintained that it is recommended that a person does not reveal his sins to people and proclaim his repentance between himself and Allah.
On how you should seek forgiveness from Allah, you have to make a since repentance.
First, your repentance should be meant for the pleasure of Allah. It should not be intended for showing off.
Second, you must express remorse for the sin you have committed.
Third, you must give up this sin.
Fourth, you must have a strong resolute not to make this sin again.
Moreover, you must increase your righteous and good deeds especially praying in congregation at mosques and doing other deeds that draw you closer to Allah.
You must also close all cracks and avenues that may give room for Satan such as mingling with women or talking to them without a legal reason.
Allah Almighty knows best.