For better or for worse, a great many people take medication for depression or anxiety which would be truly bad news to combine with alcohol. I was under the impression a celebrant MUST get drunk enough to not be able to identify Mordechai from Haman, but was not sure whether this is merely an optional custom or mandatory portion of observance. Can someone taking said medications opt out of drinking during Purim?
DO NOT DRINK IF IT IS MEDICALLY CONTRAINDICATED!! NEVER EVER EVER!!
Immediately after the statement about "obligation to drink on Purim", the Gemara tells a tale of one rabbi who got drunk and very nearly killed someone. Most rabbis say that's just a cautionary note to moderate your drinking, but the Baal HaMaor says the Gemara is refuting the previous statement, i.e. there is no obligation to drink at all. We try to accommodate the other opinions if it's not too difficult, but if someone has reason not to drink, they can certainly rely on the Baal HaMaor.
But putting aside the Baal HaMaor: If a person needs antidepressants, that's a potentially life-threatening condition and (unless both their doctor and their rabbi says otherwise) they can violate Pesach, Yom Kippur, Shabbos, etc. if needed to take them. They absolutely, most certainly can and should be passive about this rabbinic quasi-commandment. They are obligated to preserve their health and not do anything that could put themselves into the emergency room.
I think the most succinct words of wisdom on this subject are from Kitzur Shulchan Aruch:
However, one who has a weak constitution, and also one who knows himself, that by this (excessive drinking) he would treat lightly, Heaven forbid, some commandment, a blessing, or a prayer, or will come, Heaven forbid, to irreverence, it is best (for him) not to get drunk. (Thus) and ''all your actions will be for the sake of Heaven.''
Note in that quote the "excessive drinking" is the translators interpolation. Really he is talking about any level of drinking that could bring a person to miss a commandment, it all depends on the person. Avoiding dangers to your health is most definitely a commandment.
Again to reiterate: NEVER ENDANGER HEALTH FOR ANY MITZVAH EXCEPT CARDINAL SINS (IDOLATRY, MURDER, FORBIDDEN RELATIONS) Besides for Rishonim (R. Ephrayim, Baal Hameor, Ran, et. al) who hold that the Gemara of chayiv inish does not reflect the final ruling, and the many attempts in Rishonim to lower the degree necessary, many Rishonim write explicitly that the Gemara was never saying an obligation in the first place, but merely a "good thing" these include Raavya cited in Hagahos Maimunis to Rambam Hil. Megillah 2:15, and Maharil (responsum 56 I think) coted in Darkei Moshe. Many poskim even Sephardi (in spite of the fact that the quoted Rishonim were Ashkenazi) such as the Kaf HaChayim and Knesses Hag'dolah, rule this way. THis is also the psak of the later Ashkenazi poskim. I have yet to find anyone who disputes this explicitly in Rishonim or Acharonim.