I couldn't find anything in the usccb.org Catechism specifically referring to a firm purpose of amendment in the confession section, but maybe I didn't look hard enough.
Anyway, it was my understanding that you need a firm purpose of amendment in confession, meaning the resolution not to sin again and to avoid occasions of sin.
So, if computer/the internet are an occasion of sin for me, does that mean I have to resolve to get rid of my computers and never use the internet again?
Or, for example, if riding in a car is for some reason an occasion of sin, do you have to resolve to never ride in a car again? That's intended to be an extreme example, but I'm just asking how far should you take it? Or am I missing something (I assume I am)
If a certain activity is routinely causing you to fall into a state of mortal sin (even if this activity, itself, is not inherently sinful) then you still have a duty to avoid such an activity…
That said, be realistic about it. I mean, you could say that getting out of bed in the morning is an occaison for mortal sin and this may be factually true for a person who is regularly struggling with sin, but this wouldn’t mean that you should stay in bed all day to avoid the near occasion of sin. This type of thinking has a tendency towards scrupulosity… which is a dangerous place to go.
For starters try identifying (as specifically as you can) the activity that causes you to sin. For example, if watching a certain TV show causes you to experience lustful thoughts then a reasonable resolution would be to stop watching that particular TV show and find something else to watch. You could also go with the more extreme resolution to stop watching TV altogether (which would also avoid the near occasion of sin) but this goes way overboard in addressing the problem and could be scrupulous in nature.
There are two factors at play here: 1) If they are “proximate” occasions of sin, 2) how necessary they are, and 3) if there is something about them that can be altered to lessen the changes of sinning.
Speaking legalistically, and from what I know, a confession is valid as long as you intend to avoid proximate (or “near”) occasions of grave sin. These are people, places, and things that, most of the times you encounter them, bring you into mortal sin. For example, a bar would generally be a proximate occasion of sin for an alcoholic; a recovering drug addict’s former group of non-reformed friends would likely be a near occasion for him; going to a strip club would be a proximate sin for almost anybody.
In contrast to proximate occasions of sin, remote occasions are those in which the individual does not generally sin (but could sin). We do not promise to avoid these at confession, as it would require leaving the world. For example, going to a decent bar would not be a near occasion of sin for most non-alcoholics; a friend whom an individual once shoplifted with, but afterwards both learned their lesson would also fit this description.
However, at times a proximate occasion cannot be shunned without causing grave harm. In situations like these, one may be excused from avoiding it when the duty to frequent it is present. For example, most adults in the U.S. today have to drive a car attend work, etc. In this case it would not be any sin to drive a car when necessary, even if it most of the time leads to sin. One is not obligated to do the impossible.
There also may be ways to render a proximate occasion “remote”. For example, let’s say that access to the internet, considered in itself, is generally a proximate occasion of sins of impurity for John. John can perhaps move his computer to a more visible spot of the household. He can use content filtering at the router level to filter out objectionable websites (albeit imperfectly). If there are times when he tends to fall into sin, and other times when he doesn’t, he may choose to use the internet only during the latter, replacing it with some other activity at the hours when he is prone.