How to get my ex back


So my boyfriend broke up with me four days ago for really no reason. We would have been together for two years in February. When he came over, he texted me saying "we need to talk about our problems" These problems come from not being physically intimate for about 2ish weeks as well as me putting in most of the work when it came to hanging out. I mentioned something to him about it as it made me feel less confident sometimes. When I mentioned this (2 days before he broke up with me) he quickly apologized as he thought I was breaking up with him. He hugged and pleaded that I not break up with him. I said "Im not breaking up with you, I just want to work on this together" Then 2 days later he told me that he had been thinking about breaking up with me for months and had this planned for weeks, yet he would sleep over every night, cuddle me to bed, tell me how much he loved me, and we would have really fun and memorable dates together. The day after it happened I asked him to pay me the respect of at least some closure. So when I went to his place he was balling his eyes out and telling me that the "spark" was gone and that the "love was lost" he also told me that he still had feelings for me and still loved me but sometimes felt that he wasn't in love with me. We haven't been in contact since, but I really want him back so any help would be greatly appreciated.
I can see how this behaviour of his would be confusing for you. One minute he is begging you not to breakup with him....and then the next he is basically telling you he has been thinking of breaking up for months. A person who thinks the spark is gone and the "love is lost" wouldn't normally be balling their eyes out like this either. Do you think he is just saying this because he would rather say he wants to end the relationship instead of having you be the one who broke up with him? (because maybe he fears this happening so he may be trying to protect himself?)