Yes I'm baffled by so many people who think life is so black and white, 'good person', 'bad person'.
My DH, I would say, is a good person. Works hard in his job (teacher), genuinely cares for and does his absolute best for his students, cares for his family, gives to charity, loves and has a great relationship with our children, etc etc.
If he had an affair, I would obviously feel shocked, hurt, angry, betrayed; I might not be able to forgive him, I might leave him - but does it negate all of the above and suddenly make him a 'bad' person? I don't think so.
Nobody is perfect, people who are generally 'good' will sometimes do things which are not good. Just as people who at generally unkind, selfish, lazy, whatever, are capable of sometimes doing good things.
So to respond to YOUR situation OP; of course a single act of betrayal does not suddenly make you 'bad'. But this really should not be your primary concern.
That single act or crossing of a line is very VERY likely to end in heartache, broken trust, broken relationships, anger and bitterness. It is NOT worth it.
Take a step back. Work out why you feel the way you feel. Are you unhappy with DH in any way at all? Can you imagine leaving him and ending your relationship? If the answer is yes, then you need to explore this first. Is the relationship worth working on and saving, or do you need to separate?
If the answer to this is no, just imagine how you will feel for years and years and the rest of your life; the guilt, living a lie, hiding such a betrayal from him - and that is in the unlikely event that he does not find out.
There is no way that cheating will have a happy ending. It is just not worth it.