If you've read Dr. Harley, I hope you have seen his advice about affairs. He treats them as addictions--an addiction developed to the good feelings your other person gives you that your spouse did not give you.
His first plan of action is that you get the other person out of your life, pronto, once and for all. No calls, no emails, no letters, no dropping by just to say hello, NOTHING. Cold turkey. That's the only way.
The second step is that your H will have to start meeting your needs in a meaningful way. That's HIS job. But you must communicate your needs to him clearly and help him find ways to accommodate you. You'll also have to ask his forgiveness for the affair, regain his trust, and be patient while he works through his whirling feelings.
You've said that you are a flirt. Ok, you are honest. Some people are made in such a way that no matter WHAT they are getting at home, they simply enjoy the company of the opposite sex. Again, Harley says you must be aware of this tendency in yourself and NOT GIVE INTO IT. He says no rides, lunches, chats, with other men, no way. Don't give yourself the oppportunity!!!!! He also says that if someone tells you they are attracted to you or makes overtures, that you should immediately begin talking about how much you love your husband.
You sound as if you want your marriage to work. But you'll have to curb that tendency to look around. You'll have to have the old-fashioned term called "willpower". Or "character" if you will.
You'll also have to give your H a chance to recover and a chance to meet your needs. And if he can't meet them all perfectly, cut him some slack--you are responsible for your own happiness, you know. Let your H know, lovingly, what you need. If he loves you and if you help him recover from the affair, he will do his best to meet your needs. When he fails, give him the benefit of the doubt and look at the other things he does for you.
You better really decide you want this marriage and not look back. You have powerful pulls in other directions that are working against you. The fact is, you made a vow. It's your responsibility to live up to it and hope your H fills his end of the bargain. If he's not, keep working with--not ON--him. And ask yourself honestly if you aren't looking for excuses to bail out.
I'm not judging you. One of my close friends had an affair for much the same reasons you cite. I understand what drove her, but I still think what she did was wrong--her H was destroyed. She needed to get her needs met in the marriage, but she also had to look to herself and declare that walking out is copping out and fooling around is wrong.