Carwyn Jones considered resigning as first minister after Carl Sargeantâ€™s death, he has revealed.
Mr Sargeant was found dead in his home in November 2017, days after being fired from Mr Jonesâ€™ cabinet over claims of inappropriate behaviour towards women.
An inquest into his death was adjourned last week and a QC-led inquiry into the handling of the case is due in 2019.
Mr Jones is standing down as first minister on Tuesday after nine years.
Despite intense scrutiny of his actions since the death, Mr Jones has always denied he considered quitting at the time, until now.
Mr Jones made the revelation in a BBC One Wales documentary, Being First Minister, to be broadcast on Monday, 24 hours before he steps down from the role.
“It was so intense I thought - well - the only way this is going to stop, is if I go,” he said.
“If Iâ€™d have resigned a few days afterwards, it would have looked as if I was accepting blame. I couldnâ€™t do that. I couldnâ€™t do that.”
Mr Jones announced last April he would stand down and Mark Drakeford, who won the Welsh Labour leadership contest last week, is set to take over one Wednesday.
In the documentary, Mr Jones also discussed the impact Mr Sargeantâ€™s death has had on him.
“Thereâ€™s not been a day since Carl died that I havenâ€™t thought of it,” he added.
“It does chip away at you. And you do then find yourself going down in terms of your mood. Itâ€™s inevitable.
“It does affect the way you see the world - you wouldnâ€™t be human otherwise.”
Mr Jonesâ€™ wife Lisa said: “Carl has been the biggest challenge for him. Iâ€™ve seen what itâ€™s done to Carwyn and itâ€™s been horrible.
“Itâ€™s put him in a terrible, terrible place. Iâ€™ve never seen him as low as that.”
Being First Minister, BBC One Wales, Monday, at 21:00 GMT