The Rambam (Hilchos Teshuva) states that for aveiros bein adam lamakom it is better not to publicize your acts (I assume that means as long as it is not necessary for you to improve). So I would like to say that BH it has been over three days that I have not done or viewed things related to this site.
In the past I had often forgotten about this problem and would one day start thinking about it -- think that I used to do it, start to count to figure out how long it has been, when I will reach a certain threshold, and then find myself in the throws. I would remind myself that if I am not to be proud of doing what I was created to do, then even more so for not doing what I'm not supposed to be doing. This doesn't always help. I think gayva is a necessary in life, when used for good. For example, I should remind myself that I am actually too good for this kind of activity.
I often think that I am more embarrassed about the acts themselves, eg what I would look like to others, rather than embarrassed about the fact that I was being over. On this again, whatever works at whatever time. So if I find myself thinking, "oh boy what if someone saw me," then even if that's not the best way of thinking -- hey whatever works.
I have mentioned this before. I hesitate to call my specific issue an addiction, especially since it doesn't overtly interfere with anything else in my life. So then why do I have these episodes? I haven't read enough to come to a conclusion, but I do have a hypothesis. I think that for most (or all) people, the yetzer harah is a pervasive parasite. It has an independent process that is allowed to influence yourself internally, but it cannot actually act. Note the difference between a power of influence, which can be quite strong, as opposed to the power of control. There could be several reasons for this. It may be that if you didn't have the internal influence to do wrong then there would be little or no nisayon if it only came from the outside -- your inside would always reject an external inciter.
You can see this played out in many regards. One is that Adam had to ingest the yetzer hara. Another is that the yetzer harah, which works so hard to get you to do bad, will then come with you to shamayim and testify about all your misdeeds. This could explain why I may be working on myself and yet still have thoughts of acting, which can sometimes come out of nowhere. Its all part of the nisayon. This is also the epitome of nisyonos. It is so pervasive that it is even used as the mashal for other nisyonos (for an example of this, see mishlei "Isha Zarah").
Since this is the result of a foreign entity that becomes entrenched, this could mean an interesting approach to the issue. In my first thoughts, I should call a foul and say "Foreign Objects!" Remind myself that these influencing thoughts are not me, and I would be wise not to listen to them and let them develop. I can also give myself a five yard penalty -- preferably add more time to learning. (For me punishment is usually counterproductive, perhaps because it acknowledges a commonality with the foreign entity rather than disassociation.)
If I find myself going further, then remind myself -- This foreign entity has the power to influence me, but if I act, if I do anything, that will be completely my decision. Not only will I not have him as an excuse, and he will not back me up, he will actually be there pointing out the failings. Blaming Hashem won't help either -- that's why you were created. Man was created to honor hashem, including the fight against the yetzer harah. If there was no yetzer harah, or if he was so weak that my win would be obvious, then what's the point?! my own enjoyments in life?! to get mitzvos without a battle? -- that would be delusional.
--- Once again. This usually works for me, even if you do not agree with everything. However, please let me know what you think.