You're going to get a load of advice and personal judgements from this post, so I'm going to avoid all of that and just give you a practical list of things you need to do, emotions aside.
For now, try to forget "the other woman" of it all - focus on your marriage. Look at it objectively - what is missing now, that was present a couple of years ago? Make a list. At some point when the kids aren't around and you can relax and get into it, invite your husband to sit down and talk about the quality of your marriage - explain clearly what it is (referencing the list you have made) that you feel is breaking down, and at this point you really need to tell him that you feel as though it may even be over.
What happens next I can't say - it could be your husband feels the same way, or perhaps he wants to stay together. Whatever you do, don't do it "for the kids" - leave them out of it. Kids grow up happier seeing happy parents even if they are separated, the point is you need to be giving your husband a say in what happens next.
Either way, you need to move forward and put aside the relationship you have begun with your friend. As genuine or not as the relationship might be, currently it is acting as a symptom of the breakdown of your marriage and you need to separate the two to see how you really feel about it, with distance and time rather than being caught up in the whirlwind of it all.
Talk to your husband. As soon as you can. He may be distant but he still has feelings and you are doing him a huge disfavour by not considering them.