Thanks for the quick response.
Yes, you can break your lease since you have the doctor's note and the Mass Housing Inspection. See Massachusetts General Laws Chapter 111 Section 127L.
You are entitled to get your security deposit back. If your Landlord does not return it, you may sue the Landlord for its return.
Your Landlord may however sue you for breaking the lease. It is therefore imperative that you have the doctor's note and the Mass Housing Inspection report handy to defend the case: you had to leave because of serious violations of the sanitary code.
Attorney
Massachusetts licensed Attorney with over ten years in general law practice.