Basically you severely irritated your digestive system by not giving it time to adapt to a powerful oxidant.
What came out was likely mucous produced by the lining of your gut to protect itself and the pain was due to tissue damage and irritation.
MMS really can be dangerous stuff. Individual tolerances vary widely