Djokovic, who went down 6-3 6-1, missed his grandfather's funeral on Saturday having learned of his death earlier in the week.
Despite the personal loss, the Serbian believed that he had given a good account of himself during the tournament week.
"I definitely don't want to take away anything from Rafa's win, but it's a fact that I didn't have any emotional energy left in me," said the world number one.
"I just wasn't there. I've never been caught up in this kind of emotional situation before. It's been a very difficult week for me to go through mentally. I won three matches since the news. I mean, I think I did pretty well."
The defeat was Djokovic's third loss of the season.