PPD and breastfeeding

If I tell my doctor I think I’m depressed do I have to stop breastfeeding if prescribed an antidepressant? Or does it depend on what it is? Really the only thing I’ve been proud of myself for is breastfeeding. I know there’s no shame in formula and fed is best but I feel absolutely devastated thinking I have to give up now when I only just started. I’m considering not telling my doctor so I can keep going.