While speaking with People magazine and Entertainment Weekly for the latest edition of "The Jess Cagle Interview," Gyllenhaal explained how his life changed after the death of "The Dark Knight" actor.
Ledger died in 2008 at the age of 28. Gyllenhaal and Ledger co-starred in "Brokeback Mountain" together in 2005, and the two were also close friends in real life. Gyllenhaal revealed that it is still difficult for him to cope with the death of his friend.
"Personally, it affected me in ways I can't necessarily put in words or even would want to talk about publicly," Gyllenhaal said. "In terms of professionally, I think I was at an age where mortality was not always clear to me."
Gyllenhaal, 35, explained that Ledger's death made the "Southpaw" actor face the reality of how short life can be, adding that it changed his perspective on what's really important to him.
"I think you live in this bubble, too, of making films ... There are real friends, and there is a real community," Gyllenhaal said. "There is also that [new Macklemore song] where he says, 'The curtain closes and nobody notices' ... I think that's true, and I think that's okay."
He added: "But I think at the time, I assumed everyone would notice -- and they did with Heath dying, but I think it [gave me] the experience of, 'This is fleeting.' 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, and the people you learn from when you're preparing for a film. That changed a lot for me."