It is totally understandable that you are feeling this way of course. All you can do now is hope for the best, that you did not spread it to him, and be honest and tell him ASAP. Tell him, the truth, which is that you only recently learned that it can be spread when you are not having an outbreak, and you feel terrible about putting him at risk.
If you gave it to him, he will definitely know in the near future as the first outbreak is the worst, and herpes is not a subtle disease.
I don't get outbreaks anymore and simply say that I have it in my body and it very rarely resurfaces. I tell them that there is a risk though, but that many people who live healthy lifestyles full of proper diet and exercise never have outbreaks and never spread it to their lovers.
For me personally, I would be more upset about the dishonesty than the fact that you have herpes. You definitely need to open up to not just him, but all others with whom you may become intimate.
And if it leads to the end of this relationship, please know that there are many cool people out there who would accept it, still love you after learning it, and perhaps not even think it's that big of a deal if they are in any way educated about it.
My sister has it, told her husband about it when they first started dating and they now have 4 children and he is herpes free.
Hang in there and remember that honesty is not only the best policy, but a crucial foundation of a healthy long lasting relationship.
Don't be too hard on yourself. It is a very difficult topic to discuss and we have all been there!