When news of the death of actor Johnny Lewis hit, Katy Perry was hit harder than most others -- because she and Lewis used to date.

Lewis, an actor on FX's 'Sons of Anarchy,' passed away from either a fall or a jump from a rooftop following a violent altercation with his landlady. Authorities believe Lewis may have beaten the 81-year-old property owner to death.

A source said that Perry is "devastated" by the loss of Lewis, whom she dated from 2005 to 2006, and who inspired some of her hits. "She had to separate from him ... to get ahead and focus on her career," the source explained of their '06 split. "He was in trouble then and she couldn't help him ... They had good times. It's really sad. She could never help him and couldn't [let herself] go in that direction. But she was young and it was a time in her life she cherishes."

Perry's had a thing for bad boys for a while. Following her split with Lewis, she dated Travis McCoy, who made no secret of his substance abuse problems, married Russell Brand, who battled addictions from everything from sex to heroin and John Mayer, whose only real addiction seems to be to short-term relationships and running his mouth.

Aside from the normal trauma of losing a loved one, Perry also lost a muse. "A lot of her songs were partially inspired by him," the source revealed. "I know 'The One That Got Away' and 'Circle the Drain' are partly about him, as well as Travis [McCoy of Gym Class Heroes]."

Our thoughts are with Lewis' loved ones and Perry at this time.

Watch the Katy Perry 'The One That Got Away' Video