"The ... rituals were my distraction,'' he wrote. "When I was in college and nervous about entering the world of broadcasting and earning a living, the pressure was enormous. ... As a defense mechanism, my brain had set up an elaborate maze of rituals that kept me from confronting my fear."
He said once he made the connection, he instantly stopped his compulsive behavior and now practices transcendental meditation.
The basic treatment for OCD involves exposure to one's thoughts, then preventing the response or compulsive behavior. Whiteside said severe OCD sufferers will require the help of a therapist. Others can take a more mindfulness approach, like Stern, and simply allow their thoughts to surface and not react to it, he said.
The "Titanic" actor once played another famous sufferer of OCD, Howard Hughes. In fact, while playing the role, DiCaprio's got back in touch with his own childhood obsession: sidewalks.
"I remember as a child, stepping on cracks on the way to school and having to walk back a block and step on that same crack or that gum stain," DiCaprio told About.com at the time the Hughes biopic "The Aviator" was released.
"Let's just say it took me a while to get to set, having to step on tons of things," he said, laughing.