SAN FRANCISCO – And things had been going so well for Scott Schoeneweis …

The Met reliever actually was hearing cheers from the fans at Shea after being a punching bag last season and much of this one.

Good thing for Schoeneweis that last night’s meltdown came on the road.

Schoeneweis entered in the ninth inning with the Mets leading the Giants 9-3, and he proceeded to give up two walks and a three-run homer to Travis Denker. That made for some sweaty palms before Billy Wagner induced a game-ending double play to preserve Pedro Martinez’s first win of the season in a 9-6 Met victory.

Schoeneweis’ shaky outing was a marked contrast to his recent efforts, which actually had brought Met fans into his camp.

Yes, those were cheers from the home crowd when Schoeneweis entered recent games.

“It’s been a nice change,” Schoeneweis said with a smile before last night’s stinker.

Schoeneweis, who was even booed during introductions at this season’s home opener, has gotten the home fans behind him recently by getting opposing hitters out on a regular basis.

Going into last night, he was fourth among NL relievers with a 1.17 ERA and had not allowed a run in his previous six outings (a span of 7 1/3 innings). He also did not give up a run in 22 of his first 25 appearances this season.

*

Backup catcher Raul Casanova is leaving the team for three days to return to Puerto Rico after the death of his father yesterday. The Mets are placing Casanova on the bereavement list, which allows him to depart for a minimum of three days and a maximum of seven days.

They will call up Robinson Cancel to take his spot in the interim. Casanova, the Mets’ third catcher and primarily a pinch-hitter at this point, is hitting .275 in 18 appearances this season.

*

Second baseman Luis Castillo and catcher Brian Schneider were not in the lineup last night, which manager Willie Randolph attributed to the Mets having a day game today immediately after a night game.

Castillo also isn’t completely recovered from the strained hip flexor he suffered last week. Randolph, meanwhile, continues to insist Schneider is not part of a platoon with Ramon Castro, even though Castro has started five of the past eight games.