Medication while pregnant

I'm currently 14 weeks pregnant and have started to have panic attacks everyday. I don't know what is causing them but it's really bad. I met with my doctor last week and she mentioned going on medication. I declined her offer but I may need it. Are you all taking or have taken medicine for depression, anxiety, and bipolar while pregnant? Did it affect your baby in anyway? I'm having a hard time dealing with things and need some help.