Would beginning to masturbate - then ceasing to continue (well before climaxing) - constitute a mortal sin, or a venial one, since it has been denied its ultimate purpose? I’m guessing that it’s still a mortal sin - but I definitely feel (on a personal level at least) that ejaculating is much worse, as the temptation has been temporarily fulfilled - as opposed to resisting it half way.
I will refrain from assuming you are personally guilty of this and will treat it as a hypothetical situation.
I’m not sure if the scenario you describe means doing all this
intentionally, planned out in advance, or if you mean beginning to masturbate then changing your mind and stopping.
If it is planned out in advance, then yes the person has committed the grave sin of taking sexual pleasure outside of its proper marital context, and the level of planning would suggest to me a high likelihood that it is sufficiently deliberate to constitute a free moral choice, and therefore would be mortal if there is sufficient knowledge of the objectively evil nature of the action.
Now, there is also the possibility that the person began to masturbate, but in the midst of the action reflected further on its moral character and made the decision to stop. In this case the decision to stop would be a highly admirable action. We would still need to look at the action beforehand though and evaluate it on its own merits, regardless of what happened later. It may well be that the initiation of the act was so spontaneous that it did not constitute a mortal sin, and that as the person reflected on the situation they then made the correct moral choice and ceased masturbating. In this case a mortal sin would not have been committed. On the other hand, the initiation of the action may have been sufficiently conscious to be a mortal sin, and the person simply had a change of heart afterwards, but before the biological climax of the act. In either case stopping was an admirable action. Objectively speaking though the issue of whether a mortal sin has been committed depends on whether that
initial free choice to stimulate one’s genitals was made, whatever happened after the action began.
When in doubt, generally a person should confess the sin. Almost certainly at least a venial sin was committed, but it can be tough to distinguish venial from mortal in grave but spontaneous sexual matters. Better to confess a venial sin as if it were mortal than fail to confess a mortal sin.