Philadelphia

It was around Thanksgiving when the people in this fatalistic sports city had reasons to feel unusually optimistic about the Eagles and 76ers. The Eagles were 9-1 and coming off a shellacking of the Cowboys. The Sixers had won five of six games and made the Golden State Warriors break a sweat.

Philadelphians celebrated such a triumphant time the only way they knew how: They fretted that it was all going to end in disaster.

“You have to remember: When you’re a lifelong Philadelphian, it’s years and years of disappointment,” said Jim Kenney, the mayor of Philadelphia.

It turned out they were right to be worried. Carson Wentz had a season-ending injury right before the NFL playoffs last year, and Joel Embiid fractured his orbital bone right before the NBA playoffs in March. Which makes what happened next as unexpected as it was un-Philadelphian.

The Eagles won their first Super Bowl. The Sixers, who were not interested in winning anything until recently, are the favorites to win the Eastern Conference.

And now everything’s coming up Philadelphia. Villanova is college basketball’s national champion. Meek Mill is free. The Phillies aren’t terrible. It’s only a matter of time before scientists discover that Wawa hoagies cure cancer.

All of this is happening in a city that, until February, had only one major sports title in the last three decades. Philadelphia’s teams were so tragic for so long that Matt Yeck, a 38-year-old bar owner and Eagles and Sixers season-ticket holder, took it upon himself to diagnose the city with a clinical psychological syndrome.

“Post Traumatic Sports Disorder,” he said.

Ben Simmons and the Sixers have found themselves swimming in confetti this season. Photo: Mitchell Leff/Getty Images

If there were ever a time for Philadelphians to steel their nerves, it’s after the Sixers were stunned in Game 1 of their playoff series on Monday night by a Boston Celtics team so depleted that Bill Russell could have given them quality minutes instead of sitting courtside. But there is also reason to believe the good vibes that have invaded Philadelphia mean this team, which is still heavily favored to win the series, is uniquely prepared to bounce back from a loss that not long ago would have spooked an overwrought fan base.

That losing one playoff game on the road was disappointing shows how much progress the Sixers have made this season. They were, until recently, the most depressing team in town. But unlike other horrific basketball teams—the New York Knicks, for example—they were awful on purpose.

The radical idea behind their rebuilding was to be very bad for a short time to be very good for a long time. Their former general manager Sam Hinkie became the patron saint of the process that came to be known as The Process as he took advantage of the NBA’s warped incentive system, which gives the worst teams the best shots at the highest draft picks, and stockpiled enough assets to give the Sixers the league’s brightest future. But he was long gone by the time his plan began to work. Hinkie resigned in April 2016 before Joel Embiid played a single game and before the Sixers could take Ben Simmons with the top pick in that year’s draft.

Sixers fans adopted “Trust the Process” as their mantra in a city where trust does not come easily. In fact, when the researchers behind the World Well-Being Project measured characteristics of each county across the entire country between 2010 and 2014, they found the area surrounding Philadelphia was among the lowest in the nation when it came to “trust,” and it was even lower in terms of “agreeableness.”

The academics were not surprised by their findings. They knew as well as anyone the emotions of Philadelphians: They’re based at the University of Pennsylvania.

But not even the most delusional Process Trusters believed the Sixers could be this good this quickly. They won 10 games two seasons ago, 28 games last season and were hovering around .500 past the halfway point of this season. And then disaster struck again.

A masked Joel Embiid rings a miniature Liberty Bell before a recent 76ers game. Photo: Mitchell Leff/Getty Images

Embiid required surgery in March when his face crashed into the right shoulder of teammate Markelle Fultz, which happened to be the same right shoulder that had been injured and kept the No. 1 draft pick sidelined for most of this season. Pain begets pain. It was classic Philadelphia.

Until it wasn’t. All of a sudden, the Sixers became unstoppable. They won 17 straight games in Embiid’s absence, and now that he’s back alongside Simmons, it would be more of a surprise if they didn’t make the NBA Finals.

That makes the Sixers oddly like the Eagles. The worst thing imaginable happened to them. They won the Super Bowl anyway. And it may have changed the tenor of the city.

Wentz was the most promising young star in a city filled with them. He led the team to an 11-2 start. He was a favorite to win MVP. Then he tore ligaments in his knee and seemed to take the Eagles’ hopes of winning their first Super Bowl down with him.

“It was almost like, ‘I told you we were cursed. We can never have anything good in this town,’” said Ike Reese, a former Eagles linebacker who now hosts a sports talk show on WIP.

A fan at the Eagles’ Super Bowl parade sums up the psyche of the city. Photo: Mitchell Leff/Getty Images

But the Eagles didn’t fall apart. They were underdogs in every playoff game. They won all of them. By the time they beat the Patriots, Nick Foles had become the city’s most heralded sports figure since Rocky Balboa, who is not a real-life sports figure.

The Sixers felt an immediate shift in the psyche of the city. There is no team with a better net rating in the NBA since Feb. 8—which happened to be the day of the Eagles’ parade.

“One has to ask the question: Is it conceivable that victory in one sport would energize victory in another sport? The answer is, strangely, yes,” said Martin Seligman, the director of the Positive Psychology Center at Penn. “I wonder if we don’t have contagion here from one sport to another.”

Philadelphia is dunking on every sports city in the U.S. right now. Photo: Matt Slocum/Associated Press

Seligman says one of the most laborious papers of his academic life involved computing the emotional profiles of the Boston Celtics and New Jersey Nets in the 1980s by mining their quotes in the local newspapers. He determined the Celtics were optimists and the Nets were pessimists, and their states of mind had a significant effect on their play. The Celtics beat the point spread after losses far more often than the Nets did; the optimists responded to losses far better than the pessimists did. Which is helpful for the unexpectedly optimistic Sixers in their current playoff series against the Celtics.

His team of researchers at the University of Pennsylvania is now running one of its computational linguistic analyses of mood in their city after the Eagles won the Super Bowl. In other words: They’re studying how sunny it is in Philadelphia.

Reese says the anecdotal evidence is already in. He’s still adjusting to his new reality of rainbows and unicorns.

“I’m used to taking calls where people find something to complain about,” he said. “The last three to four months, it’s just been a joy to do sports-talk radio.”

Write to Ben Cohen at ben.cohen@wsj.com and Andrew Beaton at andrew.beaton@wsj.com