This isn't the whole truth either. The employer isn't responsible for getting them help. But adjusting their schedule so they can get treatment might be reasonable. They don't have to say what the condition is.
It appears the OP may have waited until the termination meeting with HR to communicate the medical condition. It's not clear that the OP actually requested any accommodations or leave. In fact, it's not clear that the company denied the OP anything or had any way of knowing the OP's situation leading up to the firing event, due to the OP's admitted lack of communication with the company.
True, you don't need to say what the condition is.