Breakup

me and my boyfriend broke up two days before our two year anniversary :( he dumped me saying we weren't compatible and we're too different. I'm so heartbroken and can't get over it. it's been about a week and I'm still a mess. I'm confused because just earlier that day we were discussing an issue we had been trying to resolve and he said he loved me and didn't think we shouldn't be together. I'm so confused! what made him change his mind? has anyone been in a situation like this? how did you deal with it? when will the heartbreak go away?