Jack Nicholson, Shirley MacLaine, Jane Fonda — it was like a wax museum to meet these people who you saw only in the movies. And then there was this beautiful girl on the red carpet in a white dress with pearls, and I asked Pedro, “What is the name of that actress?” He said to me, “She’s called Melanie Griffith.” She was nominated that night, too, and six years after, we were married. [They divorced in 2015.]

And now, over three decades after that Oscar night, you’ll be returning to the ceremony as a first-time nominee.

It feels unbelievable, it really does. It has been a year of reconciliation, in a way — with myself, with life. It’s true that this heart attack that I had three years ago took me to places that I didn’t expect. It established a new order of priorities, and I could see clearly what I had to do. You realize, for example, that the anxiety you have about success is the worst enemy, and that there are other things that are more important than money.

How would you describe your life before the heart attack?

I thought that my career was … well, not over, but slowing down. But since my heart attack, it’s almost like windows and doors started opening, and I started discovering other aspects of myself that I didn’t even know I had. I know that this may sound very stupid, but that cardiac event is probably one of the most beautiful things that happened in my life.

Almodóvar has said that he cast you in “Pain and Glory” because that heart attack lent you the ability to play pain in a very real, subtle way. In fact, it might be the most restrained performance you’ve ever given.

I realized very soon in the process that Pedro was putting the camera very close to my face, so I had to create very little universes that are meaningful and simple in close-ups, but that can communicate a lot. We created this character, Salvador Mallo, from economy. It was allowing the audience to come to us, instead of just trying to reach them at all costs.