Supreme Court Justice Clément Gascon says that his sudden disappearance last week, which triggered a police search, was the result of a long battle with depression and anxiety and a recent change in medication.

"For over 20 years, I have been dealing with a sometimes insidious illness: depression and anxiety disorders," Gascon said in a statement Tuesday.

"This is an illness that can be treated and controlled, some days better than others. On the afternoon of Wednesday, May 8, affected both by the recent announcement of a difficult and heart-rending career decision, and by a change in medication, I conducted myself in an unprecedented and unaccustomed manner by going out without warning and remaining out of touch for several hours.

"I can neither explain nor justify what I understand to have been a panic attack, and I wish to apologize most profusely to all those who suffered as a result. This health issue has been taken care of and treated with the necessary medical support.

"I confirm that I am in good health, and am fully capable of performing my duties as a judge."

Last week, the Ottawa Police Service issued a bulletin asking the public for help in finding Gascon, after the 59-year-old judge went missing from the 300 block of Wellington Street in Ottawa shortly after 1 p.m. He was found unharmed later that evening.

Gascon, who was appointed to Canada's top court in 2014, recently announced his plans to retire from his position on Sept. 15 for personal and family reasons. For an additional six months after his official retirement, he'll be allowed to participate in decisions on cases he heard while sitting on the Supreme Court.

Justice Minister and Attorney General David Lametti praised Gascon for his bravery in speaking out about his health issues and wished him well going forward.

"It takes courage for anyone to speak out about their struggles with mental illness, let alone when that person is a Supreme Court justice. Judge Gascon has demonstrated courage and strength throughout his career and in his willingness to share his story with Canadians. I wish him and his family all the best," Lametti said.

Chief justice supports Gascon

Chief Justice Richard Wagner told reporters in Ottawa he has complete faith in Gascon and praised him for his courage in coming forward.

"I am extremely proud of my colleague," Wagner said during a media event at the Supreme Court Tuesday evening.

In a followup statement, Wagner said, "I look forward to seeing [Gascon] back on the bench this week."

Gascon offered his appreciation to those who have helped him through "this trying time" and said his thoughts are focused on his future.

"Although I know that I cannot erase what happened, I wish to put it behind me and look ahead. I have learned important lessons from it and will continue to do so over time, and with the necessary patience and assistance on which I know I can count."

Former justice minister Jody Wilson-Raybould also praised Gascon for his openness in discussing his mental health.

Thank you Justice Gascon for your openness in sharing your lived experience dealing with depression & anxiety. Pleased to hear you are in good health and continuing to perform your duties as a judge. We are grateful for your service to the <a href="https://twitter.com/hashtag/SCC?src=hash&ref_src=twsrc%5Etfw">#SCC</a>. <a href="https://twitter.com/hashtag/MentalHealthAwareness?src=hash&ref_src=twsrc%5Etfw">#MentalHealthAwareness</a> <a href="https://t.co/ya9UXc39AY">https://t.co/ya9UXc39AY</a> —@Puglaas

Born in Montreal in 1960, Gascon was called to the bar in 1982 and went on to practise law for 21 years at Heenan Blaikie, the now-defunct Montreal law firm that also employed former prime ministers Jean Chrétien and Pierre Trudeau.

Gascon also taught business, labour and construction law at the Université du Québec and McGill University and for the Quebec bar.

He was appointed to the Quebec Court of Appeal in 2012 after having served on the bench of the Quebec Superior Court from 2002.