Whoever asked you if your children were illegitimate was an uninformed idiot. Your children are absolutely legitimate. I am sorry that you were in such a closed minded parish that someone said you could not attend mass without your husband. Divorce is still acceptable in the eyes of the church. It is not their favorite scenario, but the moral actions of the husband and wife after the divorce are what determine if a person can still attend mass and receive communion. My annulment took 3 years (because the diocese of Minneapolis/St. Paul is huge and I was waiting for the response of an expert in another state). The church I attend is not liberal by any means, but I never felt as though I was being looked down upon. I knew in my heart that I was living a good, Catholic life. Honestly, I think the way I am living my life right now is the best role model my kids could ever have for when they reach puberty and remember that I was strong enough to live up to the morals I promote.
That being said, Minnesota is now in the process of passing a Marriage Act that designates marriage as the union of one man and one woman. There has been a lot of talk about divorce in our church over the past few months and my 2nd grade daughter has been listening and asking a lot of question. I have tried to answer her questions as honestly and openly as possible without making her father sound like a horrible person (which isn't easy, his actions speak very loudly on his own). Even so, I tell my daughter that our family is stronger in God without her father. She has many other good men around her as her roll models (we live with my brother). Just today I told her that the divorce in our family was allowed by the church because it will help our family grow closer to God. I am surrounded with families that have both parents and I have to admit I am a bit jealous. But, I also know that I am doing the best I can with what God gave me and more important than finding a father for our family is raising good kids that don't go out and make the same mistakes that I did.
God forgives those who make positive changes in their lives to bring us closer to him. Sometimes it takes a divorce to bring us closer to him, and I think more people know that than don't. The next time someone questions you being a divorced Catholic with kids, tell them that they need to read their catechism a little more closely.