Patandorf has a good point. You won't be "locked up". You will be safe though, and that needs to take precident. If you do go, do it on a week day, because a lot of times if you go in on the weekend, you won't be evaluated until the next weekday, so you'd basically be wasting your time (except that you would be safe). As long as you are an adult, you can sign yourself back out as long as you aren't a danger to yourself.
As for work, they need only know that you were in the hospital because you were sick. You don't have to tell them that it was in the psych ward. Its really none of their business. If they require a doctor's note, ask the doctor to sign it but not put down the fact that he is a psychiatrist. Psychiatrists are doctors with a specialty in psychiatry, at least that is what I understand. You can check that out.
I don't know if you have cheated on your husband before, but if you haven't told him, before you do, decide if telling him is going to make you feel better or just cause problems. You do need to break it off with the other guy though. A marriage can only survive so many betrayals. Some people can get through cheating, while others can't. It may be one of the symptoms of your illness.
Right now the most important thing to do is to get yourself someplace safe. If you take your life, none of the rest will matter and you will never have a chance to put things right. No matter what the fallout, you can deal with it once you are on your feet again. I lost my wife and son to divorce, and though it was very painful, it wasn't the end of the world. You are important and a lot of people care about you. The fact that you are asking if you should hospitalize yourself says that you know you probably do. I know its scary and you are dealing with a lot of different hells right now, but the best thing you can do now is go to the ER. Now isn't the time to worry about what may or may not happen with the cheating and at work. There is time for that later, when you are stronger and have help to deal with it.
Please let us know that you have gotten yourself safely to the hospital. If you aren't allowed to use a computer in the hospital, at least let us know that you are going, or have your husband post a short message. Hang in there and realize that you are not alone.
Sam2