Miscarriage ?

So today I felt this excruciatingly terrible pain went to sit on the toilet and a blood clot the size of about a golf ball came out ?? my last period was in August and didn't even know I could be pregnant because I suffer from endometriosis which makes my cycle unpredictable... Now I feel horrible and can't stop crying