Confess your problems to God.
Hebrews 10:22 – ‘Let us draw near to God with a sincere heart in full assurance of faith to having our hearts sprinkled to cleanse us from a guilty conscience.’
Know the forgiveness
Tell Him what you have done and know that you are forgiven and he will forget the sin (1 Jn 1:9) (Deut 31:34).
Confess to everyone?
God does not tell you that you have to confess your sins to everyone or anyone else.
After you have talked it over with Him, ask the Holy Spirit to help you not to repeat it. He will affirmatively answer that prayer.