The very fact you’ve asked this means I think you’ll be ok!
I have 3 kids including teenagers who so far (fingers crossed) seem to be fairly level headed kids. We have had severe mental health issues in the wider family so I am very aware of the devastation it can cause, so your question is something that resonates with me and that I have often pondered.
I agree with the poster who said that we shouldn’t expect to be happy all the time and our mental health can go up and down in the same way as our physical health. I think there is a danger amongst children of thinking that if you feel sad or anxious that this is wrong and you have a mental health problem. All emotions are valid, the problem is only when these emotions overwhelm us and we can’t live our lives.
Anyway back on topic. My tops tips;
For a start a stable home, where they feel safe and loved.
Be willing to learn - read parenting books (but you don’t have to agree with it all!); look to other parents who you feel are doing a good job; be aware of how you were brought up (what did your parents get right / wrong?); and if your parenting techniques aren’t working, be open minded to change them.
Routines, boundaries, rules all help kids feel safe - but don’t be a tyrant!
if you have a partner, work as a team, agree on parenting between you, and both of you must be willing to discuss / compromise
Don’t burden your kids with too many of your own worries. That’s what your partner & friends are for.
You are their parent, you don’t need to be their best friend too. You are their advocate, their rock, their role model. Not their best mate.
Take an interest in them and their likes. Spend time with them doing things they are interested in. Praise their efforts. Show you enjoy being with them. This helps their self-confidence so much.
But also keep your own friends and interests (not so easy when they are small) as I don’t think it’s healthy to be solely focused on kids.
And don’t panic when things don’t go to plan.. the only guarantee is just when you think you’ve cracked it, something will come along to throw everything off balance again! I just try and think of it as life’s ups and downs.
If they are struggling, that’s ok - life is not easy - your job is to work out how to help them develop the skills they need to cope with life’s struggles.
Finally have fun! Be silly! Laughter is a great tonic.