cheated on my boyfriend

So I cheated on my boyfriend last night... I immediately regretted it. I just got so caught up in the moment. I really do love my boyfriend and would hate to lose him... I blocked the guys number and am never speaking to him again. Should I still tell my boyfriend, or keep it to myself? I learned from my mistake & never will do it again.