I’m sorry you are going through this. My question to you is what was going on prior to her stating that she is leaving? Women are usually more verbal about matters of the heart, is it possible that you weren’t hearing? No I’m not bashing you or pointing fingers but I’m asking honest questions I’m sure she has asked or will asked.
You need to sit down and ask your wife why she wants to leave. It’s only after knowing the reason that you can decide if you can fix the issue. Believe it or not the situation can only be resolved as the willingness of both parties. When you speak to your wife please turn your normal husband ears off, you know where you only hear bits and pieces of things and be there in the moment. If you really want to make a difference listening is going to be key.
Another suggestion after you and she have talked, be ready to come up with a solution. She may need space, she may suggest counseling, whatever the outcome you are only responsible to be willing and then do. I would make this conversation a priority in order to save your marriage.
I wish you well as I can’t give advice on any of your marital issues without knowing what they are. My prayer is for you to talk to your wife and do everything you can to save it. Divorce and separation is tough and if you can avoid it please do.