I need some advice, I think I ruined my 8 year relationship

So last night I got a snap from a high school friend of mine. I know that he has feelings for me and although we mostly talk about what friends talk about last night he took a different route and talked about wanting to be with me. I stated that he is probably bored with his relationship of his own and to rethink that. So I couldn't sleep last night and I moved to the guest room... And I left my phone in the bedroom with my boyfriend. This morning I moved back into the room while my boyfriend was getting ready for work. He didn't say anything to me but when he left the house I got a message that said "do you have anything to say to me?" I asked him why would he ask then he admitted to looking at my phone. I seriously do not mind him going through my phone because I have nothing to hide. However, it just so happened that last night my Snapchat was open and he read it. I do not like this guy at all. I talked to him because we were really close in high school. I know my mistake was to talk to him because I felt some attention after he admitted he liked me and I kind of liked it. The attention NOT him. I tried explaining to my boyfriend that it was seriously nothing and I do feel guilty for wanting just the attention. He said he wants a break from all of this because he says this is a huge problem. I've been with this man for 8 years now and we live together. I know what I did was wrong and I admit that and I will own up to it, but I do not think this is Breakup material. I want to talk to him and I told him if he can let me talk to him that's all I ask for him to do. I don't know how to engage in this conversation because he has been avoiding me all day. I know that he needs time to think about everything and I respect that, but I just don't know when I will find the right time to talk to him. I want to make a huge gesture and make him dinner tonight along with a letter about how I feel. I just don't know exactly what to say because I've already told him that what I did was wrong and that it was stupid for me to like and want the attention. Has anybody been through this before? Please comment.