How to let go..?

Hey everyone, so I’ve been with my boyfriend for a year and a half now. First year everything was pitch perfect. After that he started changing, and he states he “doesn’t know why, or what’s going through his head, he wants to be left alone”. I’ve tried so hard to keep us together and to keep him happy, but he feels the same way.. one day hes happy and wants us forever, the next day he thinks I deserve better and we need to let go... what do I.. and if you’re answer is to let him go; how do I help myself to not feel so down?? 😞