I hurt my bf

I hurt my bf by telling him “I hate you” and now we’re on the verge of breaking up. He got out early from work and I was so excited to see him (I was visiting from out of town) but when he got home he never acknowledged me. Instead he complained about the lights being on (I didn’t say anything and let it go) then about a cup of water in the bedroom (that he always insists will spill but I put it somewhere safe but near his computer) and a bag of food I forgot to throw when I was tidying up then got side tracked and started doing something else. It was just one thing after another and it made me so hurt because all I wanted to do was see him and hold him after making an hours long trip then waiting more hours for him to get out to work but instead he just started pointing out all the things I did wrong. I started crying and he turned and went to shower. This made me more upset that he would just leave me there visibly hurt. I knocked on the door real hard and this made him more upset too and I asked him how could he just leave me crying there and he said because it was over something stupid. Then I said “I hate you”. We talked and I apologized and said I didn’t mean it. That I didn’t hate him, that I loved him and wanted to speak words of love to him, not other things. I cried when I apologized because it also hurt me that I hurt him by saying that. This was 3 weeks ago and he had mentioned it was still in his mind so I said let’s talk but we never did so I thought things were okay then a week ago he said it’s still there and today he said he cant get it out of his head and it’s all he thinks about. We’ve been taking about solutions and how to help him so he thinks of good things. I told him it’s going to take time and him accepting he played a part in my reaction. I’ve apologized many times and told him what I said is not okay. That I don’t hate him, I hate how he made me feel. How do we do we fix this? We love each other very much. He says he loves me very much but is angry at me and doesn’t want to be. We agreed he needs to respond better when I’m hurt, whether he agrees with the reason or not and I need to try not to let things hurt me so much. This whole situation is just making me so sad because I want nothing more than to make him feel better.