SPRINGFIELD, Mass. – U.S. Sen. John Kerry embarked on a farewell tour of Massachusetts on Thursday, a day before he formally steps down from the office he’s held for nearly three decades to become the nation’s next secretary of state.

The longtime Democratic lawmaker began his tour with a visit to the YouthBuild USA office in Springfield before stopping in Worcester to thank residents during an event at Holy Cross college.

In Springfield, Kerry called his decision to leave the Senate a “bittersweet moment” and said his best moments did not happen in Washington but across the state when he met with residents and local organizations.

He pointed to the legislation he wrote in 1992 that created the YouthBuild program, which now has locations in 273 urban areas across the country. YouthBuild helps low-income residents ages 16 to 24 earn high school diplomas or GEDs by learning job skills building affordable housing.

“You have given me the privilege of a lifetime to represent this extraordinary commonwealth of Massachusetts as a United States senator,” he said. “I can’t think of any better work, any better job, better opportunity, and I just wanted to come out here and say thank you.”

Kerry also praised Gov. Deval Patrick’s decision to name his former chief of staff, William “Mo” Cowan, to fill Kerry’s seat until a new senator is selected in a special election June 25.

“The governor has picked a very capable, thoughtful, intelligent person,” Kerry said.