Wtf am I doing?

I sometimes think my SO (ex ?) has a split personality. One minute he can be one way and the next minute, totally different. 25% of the time he acts like an immature jackass. 75% of the time he’s so nice and sweet and loving and just want you want in a man. The bad side doesn’t seem to last long but he can say some really hurtful things. After a time he feels bad and comes to apologize. But if you don’t accept the apology and say everything is fine, he can jump back to mad again. I’m just so sick of it. We were supposed to be married this month. We don’t live together. I’m thinking it’s stupid to marry him then have to live with him and put up with this shit everyday. Right now I can leave when he starts being stupid. Usually he sees that he’s been stupid and ends up showing up at my house with an apology that same night. I forgive him and the cycle continues. I’m so stupid to be putting myself through this. I don’t even know what I’m doing anymore.