Hours after learning his grandmother died, Brandon Belt texted his wife and parents Tuesday, admitting he was struggling and uncertain he could play.

His dad reminded him that his grandma, Margaret Peterson, would have wanted to see him out there.

"I think that kind of locked me in," Belt said.

Belt swung a heavy bat with a heavy heart, hitting two of San Francisco's four home runs before dedicating them and the rest of his season to his grandmother's memory following the Giants' 8-0 win over the New York Mets.

"I've kind of been in a daze all day," he said. "I was just glad I could come out here and do that for her."

The 33-year-old Belt ended a 2-for-30 skid with a drive that landed atop Citi Field's center-field apple in the first inning, homered again in the fourth and also had two singles. The second homer was his career-best 19th of the season.

"I couldn't help but feel like something powerful was at play there when he hit that first home run," Giants manager Gabe Kapler said.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Peterson died Tuesday morning from COVID-19, Belt said. He grew up in Texas down the street from his mom's mother, and said she and his grandfather provided financial help when Belt was pursuing a baseball career in high school by traveling to showcase tournaments.

"She was always proud to brag about me to her friends," Belt said.

Kapler said he expected Belt would leave the team for funeral services in the next few days, and he would have the club's full support.

"He just looked locked in," Kapler said. "And I think that's sort of amazing given what he experienced today."

Rookie left-hander Sammy Long pitched into the sixth inning and the Giants powered up early after using late-game homers to steal consecutive victories from Oakland on Saturday and Sunday. LaMonte Wade Jr. and Mike Yastrzemski also connected in the first four innings as the Giants jumped to a 7-0 advantage against rookie Tylor Megill (1-3).

Two of San Francisco's key veterans were pulled from the game with what Kapler said were minor injuries.

Seven-time All-Star catcher Buster Posey is day to day after being removed with left knee discomfort in the fifth, one inning after being visited behind the plate by Kapler and a trainer.

Shortstop Brandon Crawford was also removed with lower back tightness in the seventh, but Kapler was optimistic he'd be back in the lineup Wednesday.

The Mets had hoped for a jolt in shortstop Francisco Lindor's return after five weeks away with a right oblique strain. Instead, they managed five hits and lost for the ninth time in 11 games. New York is 61-64 after leading the NL East for nearly three months.

"We don’t have a lot of time," Lindor said. "We can say we have a lot of time, but we don’t. Thirty-seven games (left), it’s time to go. It’s been time to go. We’ve got to find a way."

The major league-leading Giants have won 20 of 27 games while trying to hold off the Dodgers in the NL West. San Francisco entered Tuesday with a 2 1/2-game lead.

Long (2-1) tossed three-hit ball over 5 1/3 innings. The 26-year-old hadn't pitched above low-Class A prior to this season, but the left-hander with a big-breaking curveball was sharp in his sixth big league start, striking out four and walking one.

Megill was clobbered for a career-worst seven runs on 11 hits and five walks over 3 2/3 innings. The rookie right-hander limited San Francisco to a run over six innings last Wednesday.

"I didn’t have command of my stuff and then you get exposed," he said. "And they do what they do when you don’t have your stuff."

Yastrzemski's two-run homer in the second was his 20th of the season, and Wade's two-run drive in the fourth was his 17th.

LINDOR'S RETURN

Lindor flied out to the warning track in his first at-bat and hit a would-be homer just foul in the fourth. He ended up hitless in four at-bats.

The shortstop played alongside newcomer Javier Báez for the first time. They came up short on their first attempted double play when Belt beat Lindor's feed to second, although Báez still got the ball to first in time to retire Posey.

Acquired from the Chicago Cubs at the trade deadline, Báez returned Sunday after missing 11 days with a back injury and had two doubles.

TRAINER'S ROOM

Giants: 3B Evan Longoria was activated from the COVID-19 injured list for side effects from a vaccine booster shot and added to the 10-day injured list with a bruised right hand. ... RHP Kevin Gausman was added to the COVID-19 IL.

Mets: RHP Jacob deGrom (right forearm tightness) will get another MRI on Wednesday and could be cleared to resume throwing by Dr. David Altchek if there's enough improvement. DeGrom has been out since July 7 and isn't eligible to return from the 60-day injured list until Sept. 13, but acting general manager Zack Scott doesn't anticipate him returning by that date. ... RHP Noah Syndergaard (Tommy John surgery) played catch Tuesday, and Scott was hopeful he could begin a minor league rehab assignment as soon as this week. ... INF Travis Blankenhorn was optioned to Triple-A Syracuse to make room for Lindor. ... RHP Yennsy Díaz was optioned to Triple-A on Sunday, and RHP Heath Hembree was added to the active roster Monday.

UP NEXT

Giants RHP Johnny Cueto (7-6, 3.89 ERA) is expected to be activated from the IL after a right flexor strain to face Mets RHP Taijuan Walker (7-8, 3.86).