To completely detach and become indifferent will likely take years with your codependency and attachment issues so no need to constantly measure it.
You should be withdrawing all financial and emotional support while your stbxw is in an affair. Give her time and space and let her wrestle with her decisions.
You have to be the rock for your children. Be a man of your word. If you tell them you intend on keeping the house then be a man of your word and keep it. If you don’t intend to keep it then don’t tell them you do. If you’re unsure then that she be your answer.
Become the man you want to be and the rest will work itself out.