I actually found a way to bring your friend to the spaceship alive. Unfortunately, you can't win the game since it requires your friend to be dead.
At the last level, you need to get to the door with at least 80+ Health and one grenade. Open the door and leave it open. Instead of triggering the giant robot and having your friend kill himself, go all the way back to the ledge nearest to the door and throw a grenade straight down. Make sure to give some space between you and the ledge. When the grenade is about to explode, quickly walk past it or stand to the left of it. If you time it correctly and stand near the grenade at a perfect distance, you will be sent flying through the door at a perfect speed that allows you to fly past the robot without awakening it. It works better if you can fly over the robot. Because the robot is not awake, your friend can walk past the robot unharmed. If you fly too slowly, you will awaken the robot. If you fly at a wrong angle, you will die. It takes some practice. If it doesn't work, try throwing the grenade closer to the door and farther away from the ledge.
It's a pointless thing to do, but it's a pretty fun glitch to try out if you finished the game.