The 59-year-old star spoke to People about the experience of using a personal matter for the film, and how his director, Pedro Almodovar, helped him with his preparations.
"It changed me in certain ways. Yeah, and Pedro detected that. He saw it and said, 'Don't hide this thing that you have now after your cardiac problem, don't hide it. I think the character can use that because the character is filled with pain and a lot of diseases and solitude and loneliness,'" Banderas said.
Banderas said he "knew exactly what he was talking about," explaining, "Because after you have a heart attack you receive an amount of information about what life is about that is very difficult to describe in words. It just set up a new way of understanding life itself."
Telling about his experience as to what he learned from the incident, the actor said that he distanced himself from things that held no value to him.
"You become more raw. You eliminate things that you think were important in your life and you erase them from your life," he said. "Money, for example. You realize money is just an intellectual process. The things that are really important they pop up in a really interesting way."
The star suffered from a heart stroke in 2017 after experiencing chest pains while working out. The film is slated to hit the theatres on October 4.