The photo below is believed to be the final public photo of Robin Williams, showing him alongside a Dairy Queen worker in Minnesota.

The 63-year-old comedy icon, who is believed to have committed suicide at his home Monday, had traveled in June to the Hazelden Addiction Treatment Center.

Celebrities React to Robin Williams' Death

A rep for the actor said Williams had been battling "severe depression" in recent weeks.

TMZ reported the following on the rehab stay in early July:

Robin is in a part of the facility called The Lodge -- there are lots of fancy descriptions, but it's essentially a program to maintain long-term sobriety.

We're told Robin will be staying for several weeks.

The pic (above) was taken Sunday at a Dairy Queen ... walking distance from Hazelden.

Robin has struggled with addiction for decades.  He cold turkeyed cocaine and alcohol in the early 1980s and was sober for 20 years ... then fell off the wagon.  He went to rehab in 2006.

Robin's rep tells TMZ, "After working back-to-back projects, Robin is simply taking the opportunity to fine-tune and focus on his continued commitment, of which he remains extremely proud."

Meanwhile, in his final Instagram photo on July 31, Williams shared an old picture of he and his daughter, Zelda Rae Williams, on her 25th birthday.

He wrote, "#tbt and Happy Birthday to Ms. Zelda Rae Williams! Quarter of a century old today but always my baby girl. Happy Birthday @zeldawilliams Love you!"

A heartbroken Williams posted the following on Twitter last night:

‘He Really Was Patch Adams’: Director Says Williams Was 'Divinely Appointed' to Role

Larry King: Williams ‘Gave the Gift of Laughter, a Gift We Can Never Repay