That seems a little unfair. You can't control your thoughts. Did you mean seriously contemplating doing something with someone else, or were you including the random 'ooooh, he's nice' kinda thoughts?
I agree with subgirrl on this. If you're going to feel guilty every time you notice that someone other than your SO is hot, then you're going to feel guilty an awful lot of the time. And that can't be good for you. Surely it's quite normal and healthy to be in a solid relationship with someone and to have reasonably clear boundaries that allow some freedom for self expression.
Humans are social animals, and I think a bit of flirting, etc. feeds back positively into a relationship. For instance, if my wife and I go to a club and do a bit of people watching, dancing, having fun, we get eyed up and sometimes hit upon by other couples and singles. This is flattering. I can see that other men and women find my wife attractive and she can see that they're finding me attractive. It reinforces my feelings about my wife's attractiveness, at the same time as boosting my self esteem, and it does exactly the same for her. When my wife says she finds a guy attractive (whether he's a tv character or a real person that we meet) I'm quite ok with that. I don't find it a threat.
I think the question of where do you draw the line re. how much contact is allowable is very much down to what makes you feel comfortable. Some couples have very strict rules about 'no flirting whatsoever', and some couples have very open 'swinging' relationships. Who are we to say what kinds of relationships other people should have? The important thing is trust. When my wife and I met we talked for hours about relationships and how we felt about fidelity, etc. I don't think we realised it but we were already thrashing out an agreement on the nature of acceptable behaviour in a theoretical relationship between us, even before kissing, or having sex, or committing. Doesn't sound too romantic does it? But on the third or fourth date when I leaned across the restaurant table and said 'kiss me', I already knew she was 'the one', and I was pretty confident that she felt the same way. Anyway, she was bowled over by the kiss and that evening we started an amazing sex life. We've had a great time, tested our boundaries a little, but 23 years later, the trust is as solid as ever. We have some friends we shake hands with. Some with whom 'air kissing' is the way to go, and we have one or two friends with whom we can be more passionate, with bum grabbing embraces and kissing full on the lips. These are people we can be naked with when we're sailing etc. But there are still strong boundaries. We don't have sex with them. So I think it's all down to communication, and finding someone who is happy with the same boundaries as you.