Pcos, period, and spitting up blood

So the day I started spotting my stomach was hurting and I felt like I was going to puke so I went to the bathroom I never did puke but blood came up I do have irregular periods but my period actually came the next day. Why do I do this I just want to have regular periods again.