Jorge Sampaoli's side were eliminated from the tournament after losing 3-2 on penalties to the host nation as Gonzalo Jara saw his spot kick clatter off the post, while Mauricio Pinilla also saw an effort hit the woodwork during extra time.
"We were so close," Diaz told FIFA.com. "But when that one didn't go in, I started to wonder if luck might not be on our side today.
"Maybe this was a match we just weren't destined to win. But we put a lot into this tournament and we go home proud, with our heads held high."
Brazil will now face Colombia in the last eight of the tournament.