The Spaniard, who currently owns both the French Open and Wimbledon titles, erupted in frustration at his game against the French veteran.
The Spanish second seed called his 4-6, 7-6(5), 6-4 defeat the "worst match" of his career.
But he took to Instagram on Saturday to calm the waters as he prepares to make amends on court at the US Open.
"I want to apologise for my attitude yesterday, it was not good and that should not happen on court," he posted.
"I'm human, the nerves had accumulated and sometimes it is very tough to control when there is that tension. I will work so that it doesn't happen again."