Katy Perry got emotional during a live streamed therapy session ... saying she's ashamed of thoughts she's had in the past when she was depressed.

The pop star was speaking with Dr. Siri Sat Nam Singh -- known as "The Therapist" on Viceland -- when she opened up to him about suicidal thoughts ... something she wrote a song about.

Perry also discussed love issues ... like how she just recently learned how to hug.

Katy's live-streaming her life leading up to a free concert in L.A. Monday to promote her 5th album, "Witness."