Must have been awful to face the court situation. I haven't gotten that far yet. I posted in your thread on MLC, so I'll keep this brief.
You've got to let her go. She'll get her way one way or the other. Don't roll over and give up what is rightfully yours, but you should let her go. If she wants to come back some day, then you have a decision to make. But for now, you cannot keep her in the marriage. You couldn't force her to marry you, and you can't force her to stay.
You will be just fine. That might take a while, but it will come. Keep working on yourself and doing what you can to live a joyous, meaningful life even in this terrible time. Even in painful moments like this we have blessings for which we can be grateful. Live in the moment and accept what is. Pain, stress, and anger come when we resist. Use this time to learn more about yourself and life in general, and it will not have been in vain. Take care of yourself, and do some good for others.