Can gaming be masochistic? Do you play games for the thrill of failure, or for the triumph of succeeding over a challenge? Do you get any buzz at all from dying in videogames? Does the rage that comes with throwing a control count as part of the buzz? What about sadism? Do you get any kind of release from inflicting virtual pain on your virtual enemies?
You're being too specific and narrow about the role of masochism in games - it's not a specifically the pain itself that is the enjoyment, rather the masochism emerges from the process of playing the game (the "gameplay process").
There's an entire genre of games where the core of the gameplay and the game experience relies on the games ability to frustrate and humiliate the player for their mistakes, and this is the genre I will mainly be analysing, through the extreme of
I Wanna Be The Guy, and also
Super Meat Boy, a somewhat mellower game. In addition, take "player" to mean the player of these games, assuming the usual archetype of someone who plays games to be challenged.
There's a related observation to make about the role of the game developer in this. The intentions of the IWBTG developer are clear - he wants to create a game that is as close to impossible to beat as possible. He designs a game to humiliate the player at every turn. In one of the first few screens, the player has to edge forward, avoiding deadly falling apples, only to then be hit by an apple that flies *up*, with no way for the player to know this beforehand. This is obviously sadistic - he enjoys creating a cruel game, and enjoys people playing his cruel game. So we have a sadistic developer looking for players for his game, and he finds our player. Our player implicitly assumes the opposite role of the masochist: the receiver of punishment.
In these games the player undertakes the task of conquering a game designed to make them fail in order to achieve gratification. Players of these games are constantly bombarded with reminders of their own failure, causing real mental anguish. This is the pain, degradation and humiliation of masochism.
This pain is not specifically what evokes gratification in the player, however - the player does not enjoy the specific failures during gameplay. But we have to frame this in the entire gameplay process, and in doing so we realise that this pain cannot be truly separated from the gratification of finally "beating" the game.
Taking SMB for example, we have a rather simple game, the main bulk of which is taken up by "failure events", moments in gameplay where the player fails. If we were to modify this game by making one single change: the removal of failure events (or specifically the challenges that cause that failure), the dynamics of the gameplay process change significantly. We now have a game that contains no challenge and no failure events. Since the gratification upon completing a game is dependent upon the challenges conquered throughout the gameplay process (simply: our player does not enjoy playing games that present no challenge), by removing those challenges the gratification is reduced if not eliminated altogether. That is, the player
must willingly subject himself to pain in order to achieve gratification.
This shows the masochism blatantly - without the pain there is no gratification, therefore it is integral to the gratification. The gratification clearly does not come solely from beating the game, it has a significant portion reliant on pain.