Preston Duffee has been singing and playing music for as long as he can remember, thanks to his father, who gifted him with an acoustic guitar one Christmas. But it has taken the 21-year-old artist years to be able to sit down and write a song.

During the latest episode of Season 21 of American Idol, Duffee bravely told viewers that he unexpectedly lost his mother to suicide two years ago.

“She just struggled with bipolar and depression, and over time it got harder and harder for her to hide it from us,” Duffee explained.

“That day, we all went to church. We had a cookout after that at the house. All of our friends came. Mom was in a great mood. But as people started trickling out, her mood started to change,” he recalled, sharing the unfortunate story of his mother’s passing. “As I was getting ready for bed, I heard a gunshot. I didn’t know what it was at the time. But then my sister went into her room, and that’s where she found mama.”

Duffee said his mother's death led the family to become “homeless for three months because we relied on our mom's income for the bills and the house. It was really hard.”

Through tragedy and the fear of the unknown, the contestant admits the only thing that saved him and allowed him to cope and put food on the table was music.

And through the pain, he wrote his first song, called “Something to Write About.”

Duffee performed the tune on his acoustic guitar on the Sunday night (March 5) telecast of American Idol auditons. Standing in front of judges Luke Bryan, Katy Perry and Lionel Richie, he showed off his skills on his instrument while dressed in a camouflage hat and matching shirt.

And while his vocals and instrumentation shined through, it was his songwriting that seemed to hook the judges the most.

Then he told me son all you need to do / Is think of all that I’ve done for you / And how everything that you’ve been through / Has made you into the man you are now,” Duffee sang. “And it dawned on me that he was right / God, I wish that I could see things through your eyes / When I’m looking ‘round / Yeah, maybe all the hard times are something to write about.”

“Songwriting is a skill, and you nailed that,” Richie applauded. “If you can do 40 more like that, you’ll have a great, great, mailbox career. Just mail in your money, man.”

“I feel like I’m looking at a young Luke Bryan," Perry added.

“I’m gonna shoot you straight,” Bryan began. “We’ve got some other country guys in this thing that when you hear them sing, it’s gonna be hard. But what I know from you and the way you thought about that song, that’s the first song you wrote, the way you approached it, the way you wrote it, man, you’ve got a really bright future as a songwriter. Your voice will grow and be stronger.”

Afterward, all three judges agreed to send Duffy on through to Hollywood.

“If my mama were still here, she’d be really proud and tell me she knew I’d get here someday,” Duffee said.

American Idol airs Sundays at 8PM ET on ABC.

14 'American Idol' Singers Who Secretly Hooked Up — Or Did They?

At least two couples who met through American Idol got married, while one more could be headed in that direction. Not all American Idol hookups have a happy ending, however. Here are seven of the most talked about meet-ups, plus the real scoop on how serious things got.

PICTURES: See Inside Carrie Underwood's Beautiful Post-'American Idol' Home

Carrie Underwood invested her money wisely after winning American Idol in 2005. One of her first big purchases was a 3,099-square-foot home in the well-to-do Nashville suburb of Franklin, Tenn. Underwood paid $384,000 for a luxurious 3-bedroom, 3.5-bathroom stone and stucco home in a private gated community.

The house features a library, a vaulted ceiling and lovely amenities throughout, but while it's very nice, it's certainly not the kind of home you'd picture for a budding country superstar. Underwood wound up being a huge success right out of the gate with her debut album, Some Hearts, and she sold the home in Franklin for $372,500 in 2007, when she purchased the Brentwood mansion that she would later share with her husband, Mike Fisher.