Flying under that sort of medication, or worse, flying with that condition and no medication, is dangerous
Depending on the jurisdiction under which you operate, some authorities permit flying while taking anti-depressants, even at the ATPL level, Oz is one. Of course it will be on a case by case basis.