I think he needed intensive spiritual counseling. He was a poor suffering wretch. I was at the time a staffer at a church-based homeless shelter, and I and the other staff truly worked hard to get him involved in volunteer work to keep him out of trouble.
No queerness is historically a mental illness. It was successfully treated with brain shock for 70years!! It is quite reversable like any mental illness.