Actor Craig McLachlan has cited his mental health as he abandoned his defamation case relating to sexual assault and harassment claims.