If you are having such severe pain and fainted in the bathroom, you need to go to the emergency room right away. In terms of what could be causing this pain, it depends on your symptoms and what kind of delivery you had (vaginal vs C-section, and were there any complications). If you have a recent cesarian section I would definitely worry
about an abscess
or infection related to the recent surgery. Other possibilities related to your recent pregnancy include a retained foreign body (such as an instrument or a sponge), separation of the pubic symphysis (the bones of the pelvis), thrombophlebitis of the ovarian vein, or possibly bleeding into your uterus or abdomen (which may also explain why you fainted). There are also many possibilities not related to your recent pregnancy, which includes ovarian torsion (twisting of the ovary), a ruptured ovarian cyst, or any number of possibilities related to the colon, small intestine, and bladder. Given the degree of pain you're describing I would worry about what we call an 'acute abdomen', which is inflammation of the abdomen usually due to a serious infection or rupture of the bowel. All of these possibilities are serious. Please call for help right away and go to the doctor
as soon as you can.