I don't have much to add other than an additional sorry that you find yourself hear. Focus on taking care of yourself first at this point and then your kids. You can't be your best for them if you AREN'T at your best. They need you to be at your best. Your wife has fired you as her husband. As Kind suggests, avoid doing this that reward her behavior for now. Sandi's rules (referenced in the welcome post DnJ shared) are an excellnt quick reference guide to what you should/shouldn't be doing at this point. I recognize it is hard to not take actions (like having sex) that you want to take. You have to push past that and trust what the collective experience on this board reflects on situations like ours.
Also, the odds that your relationship is truly better right now are, unfortunately, very slim. Your spouse is likely bobbling in uncertainty about what she wants and following her impulses about what feels good/right in the moment. As other suggest, this can very likely involve an affair of some sort, even if only an emotional one at this point. You can't get caught up in that for now. It will consume your thinking, stress you out, and wear you down at a time when, again, you need to be doing what it takes to get your well-being as close to 100% as possible.
In my experience, while many of us here can be direct, it is with very good intent to help you, try to guide you to avoid mistakes we've seen or made, and push back on the biases we can often have at the point you're at (to want to make the marriage work at all cost which is needy and unaatractive).