A “paranoid” man who caused violent disturbances at a hospital and rail station whilst on drugs has avoided an immediate prison sentence.