Hello,
As someone who struggles with these very same sins, I agree with JR above: you need to spend some time examining why you commit such sins. It’s definitely not easy, and it’s likely that you may not like you what you find as the root cause, but it truly is necessary in uncovering what it is that allows this sin to control you.
Staying away from the computer and the internet isn’t going to suddenly cure you. Trust me, the mind can act much like a monkey at times and is just as devious in attaining what it desires! The moment you swear to never go near the internet again, something deep inside will nag at you until you give in little by little – saying “just a little peak” – until you find yourself ashamed again. This is why you need to get at the root of the problem so that when you *are *tempted you’re capable of responding with the grace given by God to say no.
And that’s a key point which must be stressed: it’s truly only by the grace of God that we can overcome our sins. If you put too much stock in your own abilities to keep from what makes you ashamed, failure is bound to happen – and this is likely why you feel ashamed. From my own experience, I declared to God and myself that I would never commit this sin again after 12 long years, and prevailed for weeks on end, but when I gave in to the temptation I felt worse than ashamed – I felt like one of the reprobate destined for hell! I took some time in prayerful contemplation and discovered that I was placing greater expectations of myself than I was capable of!
Sex, lust, pornography, masturbation, etc. are among the many crosses I --and possibly you – must bear. I don’t know how long you’ve suffered from this malady, but the road to freedom is *far *from easy. It, like the actual Way of the Cross, is full of jeering crowds, violent soldiers, temptations for relief, and pitfalls – but you and I should expect to find our fair share of Veronicas and Simon of Cyrenes to help make the load easier.