Mr Dixon said Singh had already received multiple treatments and was under the care of a female psychologist who was at the centre of the threat to kill allegation.
In terms of the wilful damage offence, Singh believed he was not being treated fairly by the authorities after exhausting his appeal rights against his New Zealand residency application being refused.
Singh believed he was being treated "like an animal" and it therefore allowed him to behave the way he did and was acting out of sheer frustration for his tenuous position, he said.
Mr Dixon said until Singh was taken into custody he had been boarding with an ACC-approved support person and he was keen to return to live there to serve a sentence of home detention.
But given police and Immigration concerns about Singh's risk to public safety, and the fact that Singh was facing deportation, that was not a realistic option, he said.
The judge told Singh "my hands are tied", and sentenced him to two weeks' jail. He signed a warrant of commitment, enabling Singh to be held in custody for 28 days to allow Immigration New Zealand time to arrange for his deportation.
No reparation was sought by ACC.
A case review hearing for the threat to kill charge will be held on May 27 if Singh is still in the country, otherwise the charge is likely to be withdrawn.