War Machine penned a suicide note in his jail cell ... in which he paints himself as the victim as he recounts the night he brutally beat his porn star girlfriend Christy Mack within an inch of her life.
We broke the story ... War Machine tried to kill himself inside a Las Vegas jail cell last week -- a plan that was foiled by a corrections officer.
TMZ obtained a letter War Machine sent to a friend the day before his suicide attempt. It's shockingly delusional. He says after they broke up and got back together, "Something seemed different about you."
He then tries to justify the beating, by saying he was stunned when he discovered her infidelity, and saying "Finding what I found that night was devastating to me, more than you will ever know," adding, "not just the unfaithfulness, but the way u cared for him and protected him."
War Machine says in the note this time he'd let Christy's new boyfriend Corey Thomas beat him up -- because he believes she would have stopped the guy and kicked her new dude out.
He then sinks into a world of self pity ... "I still don't understand how I got into this mess. I don't know why this had to happen. My life was going so well." He then has the balls to say, "I forgive you, please forgive me."