After the 49ers just missed pulling off the biggest comeback in Super Bowl history in a 34-31 loss to the Ravens, players spoke in barely audible voices and others sat at their lockers, staring straight ahead.

What does it feel like to see a Super Bowl dream come up 5 yards short?

“It was devastating,” linebacker Ahmad Brooks said.

But even in the moments after a bitter loss, some players began thinking about how they can turn their pain into a positive. Safety Donte Whitner was already looking forward to next season.

“I know me, personally, I will use this,” Whitner said. “It’s tough getting shoved off the field, watching another team celebrate, walking away with your goal. We’ll get better from this, and we will be back.”

There is reason to believe the 49ers could return to the NFL’s biggest game in the near future.

Of San Francisco’s 22 offensive and defensive starters in the Super Bowl, 19 are under contract for next season. The exceptions are nose tackle Isaac Sopoaga, wide receiver Randy Moss and safety Dashon Goldson, who can be retained with the franchise tag if a long-term deal isn’t reached. Goldson is one of the 49ers’ NFL-high nine Pro Bowl selections expected to return next season.

Of the 19 starters under contract, only four will be 30 or older on Sept. 1. The average age of the 10 offensive starters under contract: 27.3. The average age of the nine defensive starters: 28.2.

More reason for optimism: The 49ers are expected to have 14 picks in the NFL draft.

“There’s always tomorrow, the day after that and the next day,” tight end Vernon Davis said. “So, right now, I’m going to start getting excited about next year.”

Quarterback Colin Kaepernick was more succinct: “We’ll be back.”

Kaepernick is a prime reason they could make a return trip. In his first playoff start, against the Packers, he set an NFL record for rushing yards for a quarterback. In the NFC Championship Game, he directed a 17-point comeback win against the Falcons. On Sunday, he joined Joe Montana as the only quarterbacks to throw for 300 yards and rush for 50 in a Super Bowl.