A mentally ill man who fractured his housemate's jaw in a terrifying bathroom attack has been detained in hospital.