Mets third baseman T.J. Rivera reacts after he scores against...

Mets third baseman T.J. Rivera reacts after he scores against the Washington Nationals on Sunday, June 18, 2017. Credit: Kathleen Malone-Van Dyke

T.J. Rivera is playing his way up from lineup replacement to lineup requirement.

After spending parts of this season seesawing between the Mets and Triple-A — he’s played only five games with the Las Vegas 51s, but has been sent down twice — Rivera is proving indispensable to a lineup in dire need of healthy bodies. Sunday, he went 4-for-4 against the Nationals, matching a career high for hits, and since rejoining the Mets he’s 9-for-19 (.474).

“He’s one of the keys,” Terry Collins said. “You’ve got to put him in the lineup. This guy is going to get hits.

“You don’t get to this level, coming where he came from, without believing in yourself and what you can do. T.J. Rivera thinks he can hit and therefore he can hit. He has the knack to get the barrel to the baseball and he does it. He gets sent down and I’m sure he looks in the mirror and says, ‘Well, I’ve been here before. I got there once and I can get back there.’ ”

Rivera, who batted seventh, is also attractive because of his versatility. Collins said Sunday he hoped to get Wilmer Flores’ bat going by switching Flores to second base, where he feels more comfortable, meaning that Rivera took over at third. Rivera was perfect in the field, but Flores made an error in the first that led to a run, and he threw away a ball trying to turn a double play in the eighth.

“Sometimes you’ve got to look back at what got you here and keep doing the things that got me here,” Rivera said. “I just keep trying to keep a positive (outlook) no matter what happens, just be ready to help the team any way possible.”

Cabrera on the mend

Asdrubal Cabrera appears to be making significant progress in his return from a sprained thumb. On Sunday, he took batting practice and infield practice. Cabrera hit the 10-day disabled list June 13 and is eligible to return Thursday.

SUBSCRIBE

Unlimited Digital AccessOnly 25¢for 5 months

ACT NOWSALE ENDS SOON | CANCEL ANYTIME ONLINE