The 'Sound of Music' star sought help when she split from her first husband Tony Walton in the late 1960s and says it is one of the best things she has ever done because she found "clarity".
She said: "Sadly, I separated from my lovely first husband. And separations were always inevitable and the marriage was over and my head was so full of clutter and garbage.
"Believe it or not, it was Mike Nichols who really tipped me into wanting to go to therapy. He was so sane, and funny and clear. He had a clarity that I admired so much. I wanted that for myself. And I didn't feel I had it, so I went and got into it and it saved my life, in a way."
And the 84-year-old actress - who was married to Blake Edwards until his death in 2010 - is glad people are more open about therapy now.
Speaking on The Late Show with Stephen Colbert, she added: "These days, there's no harm in sharing it. I think everybody knows the great work it can do. And anybody that is lucky enough to have it, afford it and take advantage of it, I think it would be wonderful."
Meanwhile, Julie was recently honoured with the Lifetime Achievement award at Venice Film Festival.
Speaking at the annual event, she said : "I consider myself so blessed to have spent a large part of my professional life in the cinema arts.
"I still marvel at the fact that I was the lucky girl who was asked to play those wonderful roles."