According to a British psychologist who counseled Kate, she revealed her suicidal thoughts after detective Goncalo Amaral released a shocking tell-all book followed up by a TV documentary.
"Kate thought about not being around anymore," psychologist Alan Pike, who has known the McCanns since Madeleine's 2007 disappearance, told a Lisbon court.
"I deduced it was an indicator of how she felt rather than something she ever intended to do. Kate in particular wasn't very well and she shared with me some very dark thoughts which she hadn't done before."
"When people are going through trauma they sometimes feel helpless and one of the things they say is, 'I wish I wasn't here,'" Pike continued.
"One solution some people formulate is to take themselves away from it all. To share that with anyone will often alarm or worry the people they live with so I think I was the only person Kate shared this with."
Amaral's 2008 book, The Truth of the Lie, claimed Kate and her husband Gerry McCann faked their daughter's abduction and then hid Madeleine's body after she died in an accident.
The former police chief was eventually fired as the head of investigation and the McCanns are suing his book publishers.
"She spent many days in tears sobbing about the injustice being done to Madeleine by the very people who ought to have been helping her," Pike told the court.
"There were times when she felt so incensed by Amaral and his friends, by which she meant his publishers, that she simply couldn't get through each day with the panic and the anguish she felt. These were things Kate told me when I spoke to her that she'd recorded in her diary in September 2008. I remember Kate being further devastated by the content of the film."
Pike continued, "The second traumatic reaction we have is sometimes more profound than the first one, more deep-seated, more entrenched and often more extreme. They can be more difficult reactions to deal with. When I spoke to the family about the film this is what I found.
"They were extremely angry and very disappointed and very frustrated."
Amaral, 56, is defending everything published in his book.
The case is due to finish hearing evidence in November.