You do not get all of your MA withholding back. If you work in MA, then MA taxes you on income you earned there. If the state you live in has an income tax, you should get a credit for tax paid to MA. Complete your MA non-resident income tax return first.