I need medication for my depression but I’m pregnant

Am I able to take any medication for this? I’m extremely mentally unstable. I don’t want the baby to be effected. My illness is to the point of wanting to commit suicide at any moment. I feel so so low. I can’t ever wake up to do anything. I’m miserable. What can I do? Its not a matter of just speaking to a therapist.. my illness needs to be treated with medication but I don’t know what’s safe for the baby.