I am really sorry that you are feeling so sad and hurt and confused mb. I would be also in your situation but also, I see a lot of red flags. Your post doesn't state if you are living together or just dating. When you live with someone it complicates this sort of situation because it involves so much more if you part. If you are dating and not living together, just try to back off a little. He is giving some pretty clear signs that his is having issues in the relationship. You are trying to fix the relationship. It sounds like he is backing out of the relationship slowly but throwing things at you to confuse the issue so that it appears to be your fault. In a short post, it is diffucult for any of us to get the whole picture. Maybe if you explain a bit more about the "bad attitude" that is mentioned, we, as posters, could get a better view of the issue and could offer better suggestions. You say that he says you have a "bad attitude" and then you say you try to "control your attitude", so if both of you mention it, there must be an underlying cause of the attitude that I am missing here.
Believe me when I say this! You are not stuck! Everyone has choices. I know you love him but to continually be put down by a person, does only harm to one's self-esteem. You have choices, you always have choices. You can choose to stay and ride this out, hoping he changes, you can improve in areas he states he is having problems, and hope that helps, you can stop letting him know how much you love and want him and just try to be more fun like in the beginning or you can remove yourself from his life and move on. Just know you always have choices.
All relationships need a renewal from time to time, sometime that is going back to a time when you did more fun things together, laughed together, played together (not sexually intimate times, just playing),. It is easy for all of us to get into a rut. All relationships take work to keep them viable, alive and exciting! If you try some of these things and he is still pushing you away, I would think about obliging him and stepping away. You must preserve some self-respect and not beg for attention from someone not wanting to give it. (I mean no disrespect in saying it this way.......when I say don't beg....I don't actually mean that you are but it sort of sounds like you are grasping to hold on and he is pushing away.
No need to make a rush decision. There will be others come along that will have good suggestions. If you feel comfortable though, give us a bit more information so we might give better suggestions to try and help you as you deal with this situation. Best to you!