You should know that you are not alone in your struggle. Some Older men still struggle with this. But definately strive to overcome it.
I struggled with these and amazingly overcame them this year. I'm 19 now. It took being in a really religious enviroment. I got sick of the double life I was living, being a catholic, but secrectly pursuing lust. before I never dreamed I could do this, but I summoned up the courage to go to confession, and the healing began there.
Getting back up after falling was a challenge, because it was so embarassing. I had to let go of my shame and embrace God's forviness again.
It was easier to overcome my addiction to inappropriate contentography. A good tip is to avoided aimless browsing on the internet, Only use the computer if you need to for specific reasons, don't go off course. for masturbation It took about 4 months of trying really hard before I got control of myself.
Gain a firm understanding of what you believe about sex, and why chastity is better. It's harder to think when your aroused, but you need to be able to convince yourself during those moments, "this is just a temporary feeling, I won't be happy If I do this, and I will be so much happier If I don't.
Don't put so much focus on resisting the desire, focus on accomodating it, in a sense. relax a little bit, but in the right way.
if your in a "safe space" to touch, your thoughts could go like this: "should I? I will resist it! whats wrong with me, the desire's only increasing! I'll never overcome it, I give up."
Accomodate your arousal by staying out of those enviroments. For example if you are tempted to touch in the bathroom, pray before you go in, do your business, and get out immediately after.
Instead of focusing on what you don't want to do, focus on what you are and want to be.
When you are tempted to give into lust, remind yourself of your dignity as a son of God. how God designed your body for a loving purpose, it isn't for selfishness. You find happiness in fullfilling your real purpose.
emotions can play a huge role. you can use sex as a comfort object to distract yourself from emotional pain, loneliness, and frustration. I actually struggled with primarily homosexual attractions, gay sexual fantasies were a temporary escape from my longings for male connection. Homosexual desires are a whole n'other topic though. So you need to recognise and dig into your feelings, so they don't go off course into sexual desire.
Another nice thing to know. we get all this energy, and we need to release it, which we think means we need sex, but it doesn't. you can burn out your energy in other ways, being creative, getting to know people.
After you abstain for like a month, it gets so much easier, because your habbits change. the first two/three weeks are the hardest to get by. anyway, your habbits(in risky enviroments) will change, from masturbation by default, to not masturbation by default.
Now my temptation is like this. I could touch, but I would have to think about it to do it. I would have to stop myself from exiting the enviroment before anything can happen, because thats what I'm use to doing. It can still be a temptation sometimes, but my habbit has my back now! when it tempts me, I relax, stop thinking about what I might do, and just let habbit take over.
I will pray for you, at least tonight. It's hard for me to remember prayer intentions though.
Since its an addiction your brain will play some tricks on you, which you have to ingnore. the withdrawal can cause temporary depression, while your brain is rewiring, because its used to getting pleasure from these things, and suddenly its not, so it has to look elsewhere.
Joe