Your employer has a legal obligation to protect your safety at work. If they believe that continuing to work is creating a health risk for you, they may have a legal duty to forbid you from working until you can show that it's safe for you to do so (e.g. medical clearance), and refusing to cooperate with that requirement may be grounds for dismissal. Even if you are willing to keep working and take the risks, they are not allowed to let that happen.
Per https://www.hcamag.com/au/news/general/does-medical-clearance-mean-fit-for-work/153929 :
An employer has an overarching obligation to provide a safe working environment, and by not doing their due diligence (i.e. basing their assessment of an employee’s fitness to work on solid evidence) they risk incurring legal liability for any further sustained injuries.
However, an employer is well within their rights to insist on this step as a precondition to the employee returning to work, and even to eventually terminate an employee if they repeatedly refuse to cooperate with such a directive.
This has been confirmed in several recent cases, including Laviano v Fair Work Ombudsman , where an employee’s general protections claim against the Fair Work Ombudsman (FWO) was dismissed. The employee refused to attend an independent medical examination 6 times, and failed to communicate with FWO during his extended absence from work due to a psychological condition. The Court found that FWO’s decision to dismiss the employee was not taken because of an unlawful reason.
In Grant v BHP Coal Pty Ltd  the Full Court of the Federal Court found that a worker returning from a shoulder injury sustained on duty – who refused to attend a medical appointment nominated by his employer – was validly terminated. The Full Court found that the direction to see an independent medical specialist was consistent with the employer’s obligations under the Coal Mining Safety and Health Act 1999 (Qld), and that a failure to abide by this direction was reason enough to terminate the employment relationship.
If you're out of sick leave, and the employer isn't willing to give you special leave for this situation, then annual leave or leave without pay are the fallbacks.
It looks as if your doctor and family members are also concerned about your mental health, so it's possible that your employer is correct about this. (It's been a pretty rough 18 months for a lot of people.) But even if you could find a doctor to certify you safe to return to work, that might not be a good option.
Your employer has already made the call that you are "no longer able to carry out your duties"; if you were to provide them with evidence that this is not due to health issues, the next step might well be letting you go for underperformance.
Some options you could explore:
- If you are diagnosed with a mental health condition, and you can establish that your work contributed to this, you might be entitled to worker's compensation (see a lawyer). (This is also part of why your employer doesn't want you keeping on working while sick!)
- If you are concerned about running down your annual leave, you could talk to the psychiatrist and your employer about graduated return to work arrangements, e.g. gradually ramping up your work again and/or taking on duties that are safe for your mental health, if the nature of your work allows. This might reduce the number of leave days you need to take, but it needs to be a solution that will give you enough space for recovery.
Take care and be gentle to yourself.
ETA: In this other question you mention being "tired and stressed" to the point of being harsh/rude to an interview candidate and having to apologise. I am not a lawyer, but I suspect that kind of incident would be treated as pretty strong evidence to support your boss's position that you are unable to carry out your duties due to mental health issues. If seeking legal advice, it would be important to mention that as part of the context.