I'm sorry you're in this situation. It's hurtful and it's frightening and stressful. You need to get legal advice. That does cost money, but acting without counsel could end up costing you more. Don't tell your husband about you seeing an attorney. When he brings up the subject of ending the marriage, let him do the talking. Listen quietly.
I would recommend you start a notebook. Write down what's going on, like when he is there vs when he is gone and for how long. Document with time and date what he states - like him saying he is involved with another woman and his statements about wanting a divorce. Your kids are young enough that he still has responsibilities to support them. If he causes any friction in your home, document his behavior and what he talks about. It can be brief. As the situation unfolds, he is likely to lie and claim he never said this or that. A simple record of your encounters with him can be valuable in helping you keep track of what is going on. Make notes about how he converses with the children . . . or doesn't. They can be brief notes. That can be valuable, if he and you end up in a custody dispute.
Open a bank account in your name only. If you have joint accounts, consider moving funds to an account he can't touch. Apply for a major credit card that is yours alone, if you don't already have one. Make a list of debts that you jointly owe. Watch what happens to those accounts.
This is a very emotional time for you. But keep a cool eye on your joint finances. Write down any threats of any kind that he might make - about finances, child custody, etc. - and any demands. Sign nothing without getting the advice of an attorney.
I don't know much about your situation, but your husband doesn't sound like a stand-up guy. I don't know what kind of a loser woman he has found who is impressed by a man with a wife and two teen children that he's ready to turn his back on. Someday, when you get through what you have to get through, you may find that you're better off without him. For now, just take life a day at a time.