I feel like I’m going crazy

I have been acting out against my friend and I don’t know why. I really can’t help it and I keep apologizing and I mean it but I keep doing weird and rude things. I literally just sent 20 text messages in a row about how lonely I am and then he said something nice and I turned it against him. I felt right saying it at the time I even remember feeling justified in my rudeness but now I feel terrible. It’s like I go through a blind rage and I’m filled with different emotions. I cried every night for a week. I push everyone away but ONLY around my period.

Is this period related or could it be a bigger issue.