masturbation is not intrinsically evil. The Church teaches that it is a grave disorder, though it gives weight to psychological and other mitigating factors for this weakness....
As for extenuating circumstances, there are extenuating circumstances surrounding every mortal sin. One can be objectively in mortal sin without necessarily being subjectively in mortal sin, depending on the intent, sufficient reflection, etc.