Praise God that you are doing better! To combat such an obsessive problem, you must refine your life. Keep God foremost in your mind. Pray constantly. Wear a St. Augustine medal, and beg his intercession as he suffered from a lot of sexual immorality. Stop watching movies with sexual content. Cancel magazines like Maxim or anything else impure. Avert your gaze from the flesh that is peddled everywhere in our corrupt society. Look at women’s FACES. See Christ in their eyes. Confine your desirous thoughts to your wife. Get rid of any porn or near-porn. Block porn sites by using a filter. Read scripture. Pray constantly. Many of the above are things that trigger destructive impulses. Remember that, the closer you are to God, the more fierce satan’s attacks become. The evil one will not send you heroin dealers or gamblers, because that is not your weakness. He will send the flirtacious to you, he will send porn, he will send whatever tempts you because he is the tempter and knows which buttons to push. Did I mention to pray constantly? However, you can do all things through Christ who strengthens you. (Phillipians 4:13). Spend time in Adoration of Christ in the Blessed Sacrament.
As to your wife, she suspects if she doesn’t already know. When you have progressed in your struggle against sin, and it is (mostly) in your past, bring it up. Show her that you recognized it, realized that it offended God, your marriage and her. Tell her and show her that you took action. Let her know that a lot of people in this sex-soaked society have similar problems and are fighting it as well. Beg forgiveness and ask for her prayers, if she is a prayerful person. Fighting this is akn to being addicted to pain killers and working in a pharmacy-you are surrounded by it.
Christ’s peace and strength to you.