@HML,
My advice is probably not one that most here would support but I'm going to say it anyways because from my perspective you have not done anything wrong.
If your husband is not giving you the attention you need then by all means what's so wrong with finding it somewhere else? I say there is absolutely nothing wrong with what you did. If your husband would have been giving you the attention then chances are you wouldn't have any need to look elsewhere for it.
This is why I don't like the idea of marriage or monogamy because humans just are not cut out for it on emotional levels despite what they try to argue. There is absolutely nothing within our lives that we take solely and live with, nothing. Except when it comes to relationships we try to claim that they should be taken that way. Rarely does it ever work, and the only time it does is when both people are providing the needs the other requires. Once that fails, the marriage is doomed.
You have needs and if those needs are not met then by all means you should be allowed to find it without being criticized for it. But people want to live in fantasy land and assume that people never change and needs are always met. And that if you change or your needs change that it is some how your fault for allowing that to happen. Or that you should just suck it up and not change or deal with your needs in some other way. It doesn't work yet they will insist that it does.
Be honest. Tell your husband. Be honest with your self too. If the marriage fails it is not your fault alone, it is his as well for not upholding his half of the bargain. The truth is not always easy to face but we should face it otherwise we may end up in a situation that makes us miserable just because we didn't want to face it.