A Darlington woman with mental health issues who threatened to kill a nurse when she was taken to hospital has narrowly avoided an immediate prison sentence.