I'm a woman and I am quick to confess that I'm sometimes perhaps a bit overly dramatic. It happens to the best of us when our hormones are raging or our tempers are flaring. You must take the timing into consideration if your wife has made a declaration that she wants out of the marriage. Did she say it in the middle of a heated argument about your financial situation or was it in response to you saying in exasperation that you sometimes wonder why you married her? The context of when she said it is incredibly important. If it came out during a stressful moment, you have to consider that it was said in frustration. If it's something that she says in quiet times when everything between you two seems okay on the surface, that's another issue altogether.
You must get a firm grasp on the reasons why your wife says she wants to separate or divorce you. If she can't pinpoint what is causing her to feel so disconnected from you, it's vitally important that you help her come up with an answer. There is no possible way you can work towards repairing your marriage if you don't know what the issues you need to work past are. This can range from her feeling you neglect her needs to her falling out of love. Be honest with her when you tell her that saving the marriage is your main goal and that you're willing to push aside your feelings of anxiety or frustration over this to help her find her way back to the relationship.
We all cycle through positive and negative feelings within our lives. Our moods and outlook are often a direct reflection of what is going on with us at any given moment. If your wife is going through a period where she's unhappy with herself, or where her life has taken her, that will likely be reflected within your marriage. She may see the relationship as something that has stifled her goals as an individual. Perhaps she gave up pursuing a promising career so she could devote herself full time to being a doting mother to the children you two share. If that's the case, it's important that you encourage her to jump back into her own life while you help balance out the responsibilities of parenting and tending to the needs at home.
If you are determined to save the relationship, talk with your wife calmly about what you can do as a husband, and her life partner, to make the marriage more enriching and satisfying for her. Show her that you are there to support and help her over the difficult bumps in life's road. It took time to build your marriage to what it is today so don't give in to the idea of allowing all of that to slip away in an instant.