What are your concerns?
Mental health difficulties, including mental illness, are common. 1 in 4 people in the UK will experience difficulties at some point. Lots of parents will therefore have a history of difficulties with this aspect of their health.
Having mental health difficulties, including having major mental illnesses, does not automatically make someone an unfit parent.
If you're worried that someone you know is struggling with their mental health, you could offer help, ask them if they want to talk, etc. If you're faced with coping with a crisis situation in which someone is acutely unwell and needs emergency healthcare, you can phone 111 or 999.
If you have reason to believe there is a risk of harm to a child, then depending on the urgency of the situation and your existing level of involvement with the child, you might want to consider anything from speaking with the child's school/GP/HV, to contacting a social worker, to contacting the police if you believe there has been an offence or that there's an emergency.
If you explain a bit more about your actual concerns, you might get better advice for your specific issues.