can anxiety medicine help with depression too?

so i might get anxiety meds for my anxiety at night and in the mornings ... I also have depression but not as bad . i have my good days and bad days.. Can it help me though ? or i have to get a separate medicine for that ) ?