I work in military. There are mixed gatherings which are compulsory to be joined. Men and women sit separately but there is no physical partition between them. Now, if I refuse to join I may be put into trouble by bad posting stations and dismissal from service. It is permissible to join such gatherings while safe guarding ones own eyes.
Answer
(Fatwa: 827/533/H=1432)
In the case mentioned above, it may be allowable to join it safeguarding your eyes and heart.
Allah (Subhana Wa Ta’ala) knows Best
Darul Ifta,
Darul Uloom Deoband