I feel for you, Deadmanwalking...
It seems that circumstances beyond your control have conspired to destroy your life with this woman - but perhaps there is another way...
When somebody is mentally ill, and a danger to other people (even if not to themselves), an attorney can make application to have them admitted to a place where they can receive the appropriate treatment for their disease, regardless of whether the person themselves objects or refuses. In this particular case, if you do some reading on
www.f4j.co.za you will see that she is most probably suffering from some or other condition which now presents as either Malicious Mother Syndrome or as Parental Alienation Syndrome, or even both.
If you can convince your attorney to have her admitted to a mental ward for psychiatric evaluation and the concomitant treatment appropriate to whatever the professionals determine her problem(s) to be caused by, you may (MOST importantly) be able to help the child as well as your wife. Obviously, while your wife is in hospital and unable to care for the child, the father will assume primary care - which is not a bad thing, given the fragile mental state of your wife. You will have to put aside your personal prejudices with regards to this individual - he is, after all is said and done, the father of the child, and he has the right to care for his own child to the best of his ability. However, you have already stated that you have managed to a certain extent to accept this, and so this will most probably be the least of your problems.
If your marriage survives the 'incarceration' in hospital, you may very well thereafter find her a changed person, easier to live with, and more reasonable and logical with regards to resolving conflicts and letting go of past hurts, real or imagined. If, however, your marriage DOESN'T survive, you will at least be able to look yourself in the eye and say "I did the very best I possibly could for my wife" - and you will never have to lie awake at night, playing the "what-if" game of "What if I had done x? Would she be better now? Would she be happy now?"
Be warned, though, that committing your wife to hospital for evaluation and treatment is not going to endear you to her very much, especially in the beginning. Once she has responded to treatment, you may well find her resentment and anger towards you being replaced with an appreciation of what you have done to help her - but don't count on that. To put it simply, helping her is going to get her seriously p1ssed at you until she starts to get better. Be prepared for that.
Bottom line:
You obviously love your wife, which is why you're trying to help her. You cannot help her without enlising professional assistance, and she has proven unwilling to accept that professional assistance voluntarily. So then, seeing as you're looking a divorce in the face right now, and you are also concerned about the welfare of the child who is basically at the mercy of your wife's every whim and fancy, why not do what you can, what you actually HAVE to do, while you at least are still in the position of being her spouse and thus an interested and affected party with regards to her mental health? She may not thank you for it right now, but perhaps with time and love she will understand that it was your love for her that prompted you to force her to undergo treatment.
One last consideration: if she is indeed as aggressive and unreasonable right now as you portray, the closer the court case comes, the more dangerous it becomes for the child - South Africa has the dubious distinction of being the parent-child murder-suicide capital of the world, particularly when the parent in question feels that they have absolutely no choice but to kill their child in order to prevent the child being exposed to, or being put in the permanent care of, somebody whom they themselves have, in their own strange little mental world, decided is a dangerous and evil person, a veritable 'fate worse than death'. So they kill the child in order to 'protect' the child from this 'terrible fate', and then they commit suicide to escape the consequences of their actions and to keep the child 'company'. For this reason I strongly urge you to somehow FORCE your wife to be treated, no matter how much she objects. There is nothing worse than playing the "what-if" game in the middle of the night, asking "If I had done x, would the child still be alive? Would my wife still be alive?"
I will pray for you, Deadmanwalking.