Tony Vita discovered messages that spouse Marion was in a relationship with 34-year-old fraud analyst Elwira Rumniak.
A jury heard how the women, who first met at a friend's party, had planned to get married.
Miss Rumniak yesterday told Vita's murder trial at the High Court in Glasgow : "I loved her - and I still do."
It is alleged Vita, 47, knifed to death his wife - a manager with the Crown Office - at the family home in the city's Baillieston last September.
The trial heard how Miss Rumniak and Mrs Vita, 48, first met at a party in Aviemore in October 2012.
The women grew close and, a month later, the pair started a sexual relationship despite Mrs Vita being married for 20 years.
Miss Rumniak - originally from Poland - said she found Mrs Vita to be "bubbly" and that she "loved her cheekiness".
Prosecutor Douglas Fairley QC asked: "You were having an affair with Marion without the knowledge of her husband?" Miss Rumniak said: "Yes."
Mr Fairley went on: "Did you love Marion?" Miss Rumniak: "Yes, I did and I still do."
The court heard Mrs Vita later proposed to her lover by text message and that the women discussed starting a family together.
Mrs Vita eventually moved to a job with the Crown Office in Edinburgh to be closer to Miss Rumniak. This resulted in Mrs Vita staying most of the week at Miss Rumniak's flat in the capital, with her husband and son back home in Glasgow.
The jury was then told that last September 19 - the night before the alleged killing - Mrs Vita received "non stop" calls from her husband.
An emotional Miss Rumniak told the trial: "Marion said: 'He knows about us.' He had discovered text messages.
"I went up to her and held her really tightly. I said: 'We will be OK.'"
Miss Rumniak recalled Vita sending "horrendous" text messages including one to her.
She said: "He mentioned Auschwitz and how he wanted me to suffer more than what happened there."
Vita claimed he had found "disturbing messages" about the women which made him "physically sick".
Mrs Vita eventually confirmed the affair before Vita said he hoped the women would "rot in hell". The texts continued to the next day with Vita apparently talking about killing himself.
One to his wife said: "My blood will be on your hands until the day you die."
The court heard Mrs Vita eventually decided to return that evening to her home in Glasgow to see her husband and son.
Advocate depute Mr Fairley: "Did she give you anything before she left?"
Miss Rumniak: "She gave me a necklace. She had been wearing it every day and said to me: 'I am taking this off, so he does not have anything to pull."
Asked if that was the final time she saw her lover, the witness said: "Yes."
Vita denies the murder. The trial, before Judge Sean Murphy QC, continues.