I don't know why anymore, but I'm still married to her.
Courts in California used to have a waiting period, before things were finalized. It may still apply - I'm not sure about that, but it could be why you are still legally married at this point.
I'm not a lawyer, but things I have learned over time regarding this are that in general, courts look at who was/is the primary care take of the children (this is true, the younger the kids are). They also look at the financial and social resources of the parents. Meaning, if one parent has a job that is more stable then the court assumes that that person will be more dependable. This is regardless of who makes a higher income. That being said, if one parent has extended resources, maybe from one of their parents etc. and if they also have extended family nearby then the court will generally choose that parent for custody. UNLESS a finding can be made that one of the parents has a criminal history or documented mental/emotional condition.
I'm very sorry you're going through this - It's an awful thing not to be allowed to be with one's children as much as one would like. And it's real tough on the children too (assuming the non-custodial parent is "good" person). Being homeless puts you in a real tough spot : -(
However, California separates child support from visitation, i.e. even if you don't pay child support you still retain the right to visitation at least to the degree the court determined. Once a final judgment is made, it is not too difficult or expensive to request a modification. Below are a few links that talk more about the laws and processes.
This site talks about California's laws regarding custody and visitation:
[DLMURL]http://www.childsup.ca.gov/NoncustodialParent.aspx[/DLMURL]
This site has additional information and includes forms to fill out and submit to change custody or modify visitation:
http://www.courts.ca.gov/1192.htm
Living with a person with PTSD can be difficult. Sometimes the partner also has some things in their background that also adds to relationship woes. I say this because I felt that your original post shined a very negative light on your wife and seemed to entirely blame the downfall of your relationship, and your relationship with your children, on her. Don't get me wrong: that's a pretty common thing with divorce and I'm not judging you.
Again, I'm sorry you're going through this. I'm very familiar with San Diego (fam lives in north county). Unfortunately, I don't know of anyone/place where you could go. But I believe there are places for homeless men and IMHO San Diego is just about the best place to be if one has to be homeless.
This site is set up to support folks that have PTSD and their family members/friends etc. that support them. If you go to Craigslist to the forum section, you may be able to find some help there re: housing or a room, etc. Whatever you do, please don't talk poorly about your wife to your kids, do everything you can do to become stable, follow visitation rules to a T and heal any wounds you might have. I know this is tough now, but it may get a lot tougher as your children get older and they'll need your love and strong support.
Kind regards,
Drew