Is this relationship worth the effort?

I always try to help my boyfriend, and when he complains to me about things going on in his life I try to support him. He always tells me to shut up, blocks my number, etc. I know he’s allowed his privacy but now he treats me like I can be turned on and off, and only talks to me when he likes what I am saying. For example, he complains he does bad in his English lit class, but then doesn’t write his final essay. I was worried he’d fail the class so stupidly enough I wrote his essay, and he told me that he basically didn’t appreciate my work, saying it was nice but he didn’t need it after he asked me TO WRITE IT. If I tell him to stop leaving work to the last minute, to communicate with me instead of shutting me out, that I need space because he makes me feel worthless, etc, he blocks me. This was our last text exchange about 10 minutes ago. It feels like I’m dating a child!! We’ve been together for over a year so it’s hard to get over things like these. I don’t feel valued at all. I did sound harsh and I regret that because I responded out of emotion, but now I need to know if I’m overreacting, if I was justified, and if he’s really just an asshole.