The flash game Viricide has you slowly but surely repair EXADI, the EXtremely ADvanced Intelligence, purging viruses from her systems. Then she asks you to do "one last thing" for her, and this turns out to be the deactivation of her Emotional Core. She explains that this will remove her self-awareness, essentially AI suicide. And the game forces you to do it. The final conversation with her consists of a few lines of text indicating that EXADI is ready to function. It doesn't help that the voice actor is superb, and the writer did The Company of Myself.
Made all the more poignant by several things she mentions throughout the game. At one point, she mentions her creator being depressed and taking pills to fix the problem (antidepressants). It seems innocuous, until she later relates that one day he took all the pills he had at once, said he was going away, and left. She tells you that she hopes she's happy wherever he is now. Later, as you fix her up, she starts to realize that she'd done something horrible, and she let the virus in deliberately to forget what she'd done. Feelings of guilt and sadness weigh her down so much, she begs you to shut down her Emotion Core, because she just can't bear the pain of feeling any more.
A different kind of punch is delivered in Metal Slug. After finishing the game, the credits cutscene shows you what you have been doing so far in the game. Dead bodies everywhere. The final blow is a mourning widow/daughter at a grave of a rebel soldier.
A happier version of this ending with most of the soldiers still alive is shown if the game is beaten with 2 players, making it sort of a twisted version of The Power of Friendship.