Chris Wondolowski is on the verge of cementing his legacy as one of the greatest players in Major League Soccer.

So why doesn’t he look happier?

“It’s been extremely tough,” the Earthquakes’ forward said of his frustrating season. “Mentally, it’s knocked me down and had me questioning a lot of things.”

There’s no question that Wondolowski is one of the most prolific goal scorers American soccer has produced. He has 144 goals in MLS, and sits one behind Landon Donovan for the all-time record. Wondolowski has two more regular-season games — one at home against Colorado on Oct. 21 and one in Seattle on Oct. 28 — to tie or claim the record as his own.

“It seems surreal to be mentioned with Landon or part of this chase,” he said.

Wondolowski wants to get the record at home.

“What I’d really love is to do it in a win,” he said. “Hopefully, a game-winning goal.”

That would be surprising, because the Earthquakes have won a league-worst four games this season. The team hired yet another head coach this week, Argentina’s Matias Almeyda. That makes five head coaches for the Earthquakes in the past 15 months.

“I had three coaches for my first 12 years,” Wondolowski said, “so this is extremely different. My three coaches were all from the same coaching tree, with similarities. These have been guys I don’t know. I have to go out and prove myself each day.

“Hopefully, I do.”

Something has gone terribly wrong with the Earthquakes. Since the franchise returned to San Jose in 2008, the Quakes have made the playoffs just three times, and only once since 2012 (a knockout-game humiliation last season). Wondolowski, the Danville native who began his career in San Jose in 2005, went to Houston when the team relocated, and then returned home — thanks to a trade — in 2009, has been a goal-scoring machine on the league’s forgotten sibling.

Donovan’s record-setting pace came while he was leading the Los Angeles Galaxy to playoffs — and often to championships. Not Wondolowski. Though much of the rest of MLS has grown stronger, acquired high-profile players and built a foundation for success, the Earthquakes have wallowed in irrelevancy far too often.

“Right now, I think there are too many times where we’re concentrating on things other than the team performance and doing what it takes for the team to win,” Wondolowski said. “I look back on the couple of years we’ve been successful and we had that team orientation. It’s not there right now.”

The roster has flipped almost completely since the beginning of last season. There’s virtually no cohesion or continuity.

MLS all-time scoring leaders Player Goals Landon Donovan 145 Chris Wondolowski* 144 Jeff Cunningham 134 Jaime Moreno 133 Ante Razov 114 Kei Kamara* 113 * — active

Read More

Except for Wondo getting the ball in the back of the net.

This has been a tough year in other ways for Wondolowski. A year ago this week, he was an unused substitute on the U.S. national team that failed to earn a point in Trinidad and Tobago and was eliminated from the World Cup for the first time since 1990.

“It was definitely one of the darkest days,” he said.

Consequently, it was hard for him to watch this summer’s World Cup because the Americans had failed to earn a berth.

“It was tough on a couple of levels,” he said. “One, because we weren’t there. And, two, because it reminded me of the last World Cup. Of my miss.”

Wondolowski doesn’t shy away from the topic: the missed shot in extra time against Belgium in 2014. The shot that should have been a game-winning goal. The shot that would have put the Americans in the quarterfinals and eliminated Belgium (the team that finished third this summer). It’s a miss that not only haunts Wondolowski but all of American soccer — the last best chance for the United States men for at least eight years.

Wondolowski’s national-team days are over. He will turn 36 in the offseason and has started to think about what happens next. He lives in Danville with his wife and two young daughters. He likes the idea of working as a director of coaching for the Mustangs’ club team, for which he played as a youth. Or as a scout for the Earthquakes.

He has one year left on his Earthquakes contract. He said he probably already would have asked for a trade if it wasn’t for the San Jose fans.

“I love it here but, to be frank, if it wasn’t for these loyal fans, I’d already be gone,” he said. “I love playing in front of the ones who stuck with us through thick and thin. I don’t know how.”

Wondolowski laughs. He’s a lifelong Raiders fan, so he knows about being abandoned. About being discouraged. About trying to hold on to a board of hope in the pounding surf of losing and frustration.

For the past decade, the only compelling thing about the Earthquakes has been Wondolowski hammering the ball into the goal. Now, he’s on the verge of history, with a terrible team.

One of the greatest players MLS has ever produced deserves a better fate.

Ann Killion is a San Francisco Chronicle columnist. Email: akillion@sfchronicle.com Twitter: @annkillion