When the lockout was settled, the new collective bargaining agreement (CBA) directly affected Gomez in two ways — first, it forced teams to count any American Hockey League (AHL) player's salary above $900,000 against its NHL cap, meaning the Canadiens could not "bury" Gomez's salary by sending him to their AHL affiliate, as had been previously done with players such as Wade Redden, to clear cap room. Second, it allowed for up to two contracts per team to be bought out for up to two-thirds of the remaining salary, without the buyout counting against the cap in the 2013 and/or 2014 off-seasons, so as to help teams get under the reduced cap.
However, the buyouts could not be used on injured players, so, to avoid any risk of a hockey-related injury, on January 13, 2013, the first day of the Canadiens training camp, Gomez was directed by General Manager Marc Bergevin to stay home for the shortened season to ensure a buy-out at the end of the season.
With the revised agreement in place, Gomez was promptly placed on unconditional waivers and bought-out, becoming a free agent on January 17, 2013.
On January 23, 2013, Gomez signed a one-year, $700,000 contract with the San Jose Sharks. Playing in 39 games for the Sharks, Gomez recorded two goals and 13 assists.
On July 31, 2013, Gomez signed a one-year contract with the Florida Panthers. Playing in 46 games for the Panthers, Gomez scored just two goals to go with 10 assists.