Yankees pitcher Sonny Gray leaves a game against the Orioles...

Yankees pitcher Sonny Gray leaves a game against the Orioles during the third inning at Yankee Stadium on Wednesday. Credit: Jim McIsaac

“Today was a bad day for us,” manager Aaron Boone said after the Yankees’ 7-5 loss to the Orioles on Wednesday at Yankee Stadium.

True. But nobody had a worse day than starting pitcher Sonny Gray — on the mound, walking off the mound and on social media.

Gray’s verified Twitter account was changed to private status during the game. The first thought was that Gray was getting cyber harassed by Yankees fans after he was charged with seven runs in 2 2/3 innings to raise his ERA to 5.56.

Gray, who has been awkward in public settings since Aug. 1, 2017 (the day of his first interview after he was traded to the Yankees), had flashed a strange smile as he walked off the mound to a packed stadium full of boos. That smile was all over social media within seconds.

But, after the game, it was revealed that someone had unearthed and screenshotted a 2012 tweet in which Gray made a racially tinged remark.

Gray tweeted at a friend with the handle @Sir_Peanut the following: “1. You didn’t go to college. 2. You are black. #followdaleaderleaderleader clap clap clap”

Gray, who is 28, sent the tweet about two months before his 23rd birthday. Gray said it was an “inside joke” he wrote to a close friend, whom Gray identified as Rashun Dixon, a former minor-league outfielder in the A’s system who is African-American.

Yankees pitcher Sonny Gray leaves a game against the Orioles...

Yankees pitcher Sonny Gray leaves a game against the Orioles during the third inning at Yankee Stadium on Wednesday. Credit: Jim McIsaac

“If people want to question who I am, I’ll face that head on because I’m not scared of my past,” Gray said. “Everything that’s happened in my past has done nothing but make me a better man.”

It’s the latest example of an old tweet coming back to haunt a baseball player. Last month, Brewers reliever Josh Hader, Braves starter Sean Newcomb and Nationals shortstop Trea Turner apologized after old insensitive remarks were discovered on their Twitter accounts.

Gray did not apologize for his tweet. But after he was questioned about it by reporters, Gray’s account was scrubbed — every tweet was deleted.

It was the second social-media controversy of the day surrounding Gray — something the Yankees didn’t need as they departed for Boston and a four-game series against the first-place Red Sox that begins Thursday night.

Of the smile, Gray said: “I don’t think there’s no secret that was a very frustrating game for me personally and for us . . . It’s a frustrating spot to be in. That’s kind of how I handle situations, kind of how I try to tell myself to move on and not think about it. Not let it get to you. Just move on and try to look forward.”

The Yankees need to move on from Gray, not because he smiled and not because of a questionable tweet (if the one is all there is — you never know these days what people are going to find once there’s a reason to look).

No, at this moment Gray needs to go because he can’t pitch in New York. As I wrote before Tuesday’s trade deadline, Gray has proven to be one of those athletes who is just not a fit. He was fine in small-market Oakland, but he has wilted under the New York glare. File Gray along with Ed Whitson and Steve Trout and others who couldn’t make it here.

General manager Brian Cashman made several deals around the deadline. One of them should have been to ship Gray to a market he can handle. The guy has talent, and other organizations would be happy to give him a shot to see if they could unlock that talent.

The best thing that happened to Gray on Wednesday was the arrival of Lance Lynn, who replaced Gray on the mound and threw 4 1/3 shutout innings in his Yankees debut.

Boone made it clear he is considering starting Lynn instead of Gray on Monday in Chicago against the White Sox. For baseball reasons, it’s the right move. Even Gray seemed to admit that when he didn’t campaign to keep his rotation spot.

“At the end of the day, I want them to do whatever is best to help us win,” Gray said.

Only Sonny Gray knows what is truly in his head and heart. The baseball part is easy. The rest is not.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 6 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME