You seem to be experiencing a lot of guilt in addition to other feelings like confusion and distress. Firstly, you must understand that this is not an issue about being good or bad. Many people experience conflicting emotions. People in committed relationships do tend to be attracted to other people but that does not make them bad. What they need to consider is that impact of their choices.
This is what you must do. Begin by assessing your relationship with your husband and see what are the difficulties. There are many ways in which differences can be resolved. So if you are looking to improve your marriage then please work on it and you may seek professional help for the same.
With regards your feelings for your boss, it may be best for you to maintain distance as it may result in the consequences you fear. Also it seems as though you are pulled towards him because your relationship with your husband is strained. So focus on your marriage and see if that makes you happy.