The only ethical way of dealing with this is to send it back to MIL and suggest she gets a refund. You can't freecycle it and you can't donate it - at least not if you are trying to behave ethically. I know the WHO code applies to institutions and healthcare professionals and their formula distribution guidance is for governments and NGOs rather than private individuals, but the principles of it can apply everywhere. If you donate formula to a mother, you should commit to donating it for 12 months, for instance.
I think the idea of giving formula and bottles as a Christmas present is incredibly rude - clearly pre-meditated as such ('cos she told you to open it at home). The fact you know her strong feelings about bf and tandem feeding speaks volumes - how rude to make these clear to you instead of keeping them to herself.
I don't think it is irrational to be upset about it. This is really less to do with feeding choices, and more to do with a disrespectful way of treating you and your parenting decisions.
If you think she would actually distance herself from your ds in response to a cordial note from you, then that shows how shallow her feelings for ds must be, surely?
You have another 20 years or so of this treatment, unless you state your position clearly and politely. There are many, many ways she will undermine you in the future - potty training, behaviour issues, school choices, dress codes etc etc etc, and when your dc become a little more aware they will pick up on this, and you cannot continue to hide her bad behaviour...and why should you?
Both you and dh should write the letter with the return of the present. You can also follow it up with a phone call, and on both occasions, state explicitly that you are happy to have a normal, friendly relationship with them but that this does not include comments on your parenting choices.
Where is FIL in this, BTW?