A few months ago a woman wrote me that her husband in his late 20s had decided he didn't love her anymore, and wanted to separate from her and their small son. Maybe this can help someone.
Dear ________,
As people, we all are very complex, and it is difficult to "divine" another person's motives. That said, the solution is always to work toward a surrender of our lives to the Lordship of Jesus. When a man is walking closely with his God, his heart is not restless. Conversely, when a man feels like he's missed something or that life is futile or meaningless, he will be nothing but miserable.
The ultimate problem is very easy to diagnose. Your husband needs to surrender his life in faith to Christ. No one else, however, can force or otherwise make that happen. So what can you do? God has given us two forms of causality: labor and prayer. Prayer is more powerful than our labor, which is why God has limited it (or else we would destroy ourselves!). So first, I would pray.
Second, I would not be weak and beg him to stay. If he senses you are weak, that will work against you. I'm not saying it's right, but that is the way it works. Don't give the impression you will "always be there" for him, no matter what. Conversely, do let him know you are willing to work it out in an orderly way.
Third, no matter what he does, you have to take care of yourself. Take care to guard and nourish your own mind, heart, body, and soul. The two best things I can suggest are 1) professional Christian counseling, and 2) a wonderful book by Linda Rooks, Broken Heart On Hold: Surviving Separation. She is a family friend and she was reunited with her husband after several years of living through what you are going through now.
Hopefully, there is some encouragement in what I've said. Lean on Christ. You WILL get through this no matter what happens.