You feel it would be unlawful for what reason? This is an issue that is governed by the rules of evidence. In order for the state to get the letter admitted, it would need to show two things. First, it must show that the letter is relevant to some issue in the case. Since you discuss your intent in the altercation that is the basis for the trial, the DA may be able to show relevance here.
Second, because the letter is an out-of-court statement, the state has to be ready to show the statement is not prohibited under the hearsay rule if a hearsay objection is raised. In general hearsay is any out-of-court statement that the person wishing to use the statement intends to offer to help prove the truth of the statement being made. For example, a letter written by Judy to a friend in which states that “I saw Joe kill Mary” would be hearsay if the state wanted to use that letter to help prove that Joe killed Mary. Under the hearsay rule, that letter would not be admissible unless some exception in the rules allowed for it. (This rule is why the affidavits that you wanted to submit in lieu of your own testimony in court would not be admissible.)
However, out-of-court statements made by one party to the case (e.g. a defendant in a criminal case) that the opposing party (the DA) wishes to use against the party that made the statement are expressly defined as not being hearsay and would not be blocked by the hearsay rule. So, if Joe wrote a letter to friend in which he stated “I killed Mary” that letter is not hearsay and would not be blocked by the hearsay rule.
So, the letter from you to the business would not be hearsay when it is the DA wishing to use it against you in the trial. Assuming that the letter is relevant to the case, the letter presumably would be admissible. I won’t go into a discussion of the principles underlying why the rules are this way, as that really doesn’t matter; the rule is what it is.
These rules can get complex, but you need to know them if you want to succeed at trial. Massachusetts has done an admirable job of going beyond just posting the text of the evidence rules and providing a more detailed Massachusetts Guide to Evidence. I suggest you start getting familiar with it.

