I cheated on my boyfriend... help

My boyfriend is the most honest and pure boy in the entire world. I love him more than I love myself. There was this guy who I used to exchange pictures with and we won't talk but we were also amazing friends. We stopped exchanging pictures and having a sexual relationship when I started dating my boyfriend. He asked me for nudes and I said no. But I didn't block him because I still slightly cared about him. Flash forward to currently, about 5 hours ago my boyfriend and I were in his car and he was looking through my messages and he saw a message from the guy. I had told my boyfriend that we were nothing more than friends because I didn't want to hurt him. So he saw the messages and he just started bawling his eyes out. I had never met the guy and I never actually wanted to meet him or hang out with him but I had told him that we could get dinner. And my boyfriend is not breaking up with me but he is beyond hurt. And I want to gain his trust back but I don't know how. I know I am a horrible person but I didn't really talk to the guy. I just didn't block him and I responded to one of his snapchats. Which I get is completely upsetting. How can I get my boyfriends trust back? I love him so much and I want to spend the rest of my life with him. I never meant to hurt him! How are you? DO I GET HIS TRUST BACK!? HELP PLEASE