Is medication safe for breastfeeding?

I'm 3 months pp and my anxiety and depression are definitely back. I was on Prozac before I got pregnant. I don't necessarily think it's postpartum depression, it's basically just what I already had, although my anxiety feels a lot worse. The only reason I haven't gotten medicine again is because I was really trying to breastfeed without it. Is it really safe? And who do I talk to? The OB? A regular doctor? The last time I was at the pediatrician's with my daughter they asked about it but at the time I was fine. Can I talk to them?