Can someone with a mental health problem still become a foster parent?

Theproblem decides. There are many psychological problems such as mild OCD and other related mild anxiety and mood disorders which would not preclude being a foster parent. When there are personality disorders or severe mood or anxiety issues, more care and assessment would be needed to tell if it would be safe to parent, foster child or not.
With Good Help! Depends on the severity. I regularly diagnose patients with anxiety or depression but then teach them the emotional self-control skills to eliminate these problems and they leave therapy free from depression and/or anxiety, thus with no mental health diagnosis. A good psychologist can help most individuals with mild or moderate mental health problems to be good parents.