You should:
- Repent: regret what you have committed in the past, refrain from committing such sins again, and ask for Allah's forgiveness.
- Do not tell others about your previous sins.
- Use tact if asked about your past.
In Fat'h Al-Bari (Arabic: فتح الباري شرح صحيح البخاري) by Ibn Hajar al-Asqalani (Arabic: أحمد بن علي بن حجر العسقلاني) said in his commentary on hadiths 6815-6816 (Vol. 15, pp. 614):
أنه يستحب لمن وقع في مثل قضيته أن يتوب إلى الله تعالى ويستر نفسه ولا يذكر ذلك لأحد كما أشار به أبو بكر وعمر على ماعز
— NOTE: My own translation, so treat with care:
It is preferred for whoever commits a similar sin [to that of Ma'iz] that one repents to Allah, may He be exalted, and that one conceals one's sin and refrains from mentioning this to anyone, as was advised by Abu Bakr and 'Umar to Ma'iz.
Ma'iz, a companion of the Prophet ﷺ, had committed adultery (zina). He demanded to be stoned to be purified. Abu Bakr and 'Umar advised him not to advertise his sins. Ma'iz still went to the Prophet ﷺ and demanded that he be stoned to death. The Prophet ﷺ went through a series of verification question prior to commanding Ma'iz to be stoned.
There are several questions and answers provided on this site about repentance (tawba) that you may refer to:
Allah informs us in Surat An-Nisa 4:116 that Allah does not forgive shirk, but He forgives what is less than that for whom He wills. The Prophet ﷺ mentioned that all such sins can be forgiven, except for when made public:
سَمِعْتُ أَبَا هُرَيْرَةَ، يَقُولُ سَمِعْتُ رَسُولَ اللَّهِ ﷺ يَقُولُ: كُلُّ أُمَّتِي مُعَافًى إِلاَّ الْمُجَاهِرِينَ، وَإِنَّ مِنَ الْمَجَانَةِ أَنْ يَعْمَلَ الرَّجُلُ بِاللَّيْلِ عَمَلاً، ثُمَّ يُصْبِحَ وَقَدْ سَتَرَهُ اللَّهُ، فَيَقُولَ يَا فُلاَنُ عَمِلْتُ الْبَارِحَةَ كَذَا وَكَذَا، وَقَدْ بَاتَ يَسْتُرُهُ رَبُّهُ وَيُصْبِحُ يَكْشِفُ سِتْرَ اللَّهِ عَنْهُ
Narrated Abu Huraira: I heard Allah's Messenger (ﷺ) saying. "All the sins of my followers will be forgiven except those of the Mujahirin (those who commit a sin openly or disclose their sins to the people). An example of such disclosure is that a person commits a sin at night and though Allah screens it from the public, then he comes in the morning, and says, 'O so-and-so, I did such-and-such (evil) deed yesterday,' though he spent his night screened by his Lord (none knowing about his sin) and in the morning he removes Allah's screen from himself."
— Sahih al-Bukhari 6069, Book 78, Hadith 99
This means that one should not go public with one's sins, in hope that Allah will conceal and forgive one's sins on the Day of Judgment:
عَنْ أَبِي هُرَيْرَةَ، عَنِ النَّبِيِّ ﷺ قَالَ: لاَ يَسْتُرُ اللَّهُ عَلَى عَبْدٍ فِي الدُّنْيَا إِلاَّ سَتَرَهُ اللَّهُ يَوْمَ الْقِيَامَةِ
Abu Huraira reported Allah's Apostle (ﷺ) as saying: The servant (whose fault) Allah conceals in this world, Allah would also conceal (his faults) on the Day of Resurrection.
— Sahih Muslim 2590 a, Book 45, Hadith 92
Use tact as much as possible to avoid bringing up your past when directly asked about it by your wife. This, however, is a behavioral topic that is not within the scope of this site.