The 35-year-old actor discussed his late Brokeback Mountain co-star in an interview with People magazine and Entertainment Weekly. Gyllenhaal was 27 years old when Ledger died of an accidental prescription drug overdose in 2008.
"Personally, it affected me in ways I can't necessarily put in words or even would want to talk about publicly," Gyllenhaal revealed. "In terms of professionally, I think I was at an age where mortality was not always clear to me."
"I think you live in this bubble, too, of making films," he elaborated. "There are real friends and there is a real community, but there also is that Macklemore new album where he says, 'The curtain closes and nobody notices,' and I do think that's true."
"I think [his death] gave me the experience of, 'This is fleeting,'" the star said. "And none of the attention or synthesized love that comes from the success of a film really matters at all. What matters is the relationships you make when you make a film."
Gyllenhaal and Ledger played lovers Jack and Ennis in Brokeback Mountain, which opened in 2005. The romantic drama follows the complex relationship between the two characters, and Gyllenhaal admitted he was "deeply sad" after filming.
"We were super young. We had no idea what the movie was going to become," he said of the film, which won three Academy Awards. "There was a real sadness [filming]. And particularly loneliness, shooting where we were shooting, even with all the beauty around us."
Gyllenhaal described Ledger as "full of massive charisma and great skill" in a 2012 interview with the Los Angeles Times. The actor is the godfather of Ledger's daughter with Michelle Williams, Matilda Ledger, who turned 10 years old in October.