I have anxiety attacks before I had children and I will say, they have changed me for the better. Gone is my overt anxiety. Depression, well, that has kicked around and we have talked openly about it. Being depressed and having to meet other people's needs is never an easy thing.
All of this said, I think my kids (13 and 10) are incredibly well balanced human beings. We have always been extremely honest and open with them - and we have worked very hard to encourage them to find their emotions and be able to communicate them - something neither my husband nor myself did very well before.
And also, the fact that you are worrying about being a good parent means you will be one