Alan Newton, 42, a fish and chip shop owner, tracked down his wife, Patricia, after a British Telecom engineer revealed the address of the refuge to a friend, Leeds Crown Court was told.
Mrs Newton, 37, who had left her husband after 20 years of mental cruelty, was stabbed 12 times as she huddled with four women and five children in an attic of the hostel in Doncaster, South Yorkshire. Newton then tried to cut his left wrist.
The court was told that at the time of the killing Newton had been suffering from severe depression brought about by the breakdown of his marriage.
Mr Justice Ognall ordered that he be kept in Doncaster Gate secure hospital in Rotherham under Section 41 of the Mental Health Act 'without limitation of time'.
Newton, of Lordens Hill, Dinnington, near Rotherham admitted manslaughter on the grounds of diminished responsibility.
Brian Walsh QC, for the prosecution, had told the court that Mrs Newton had been subjected to years of verbal abuse from her husband. The marriage deteriorated after the couple opened a fish and chip shop which ran into cash problems.
In October last year Patricia left Newton to live in the refuge.
'He made extensive efforts to find his wife and sadly these were successful,' said Mr Walsh.
The British Telecom engineer was later sacked and prosecuted for giving unauthorised information.Reuse content