I'm not sure whether there is an explicit grammatical rule which prohibits the phrase "I'm sad with it", but I will point out that I think the main reason why it does not seem right to most people is because you're actually using the wrong word there.
In the phrase "I'm happy with it", the word "happy" here is not used in the sense of "joyful", but instead is used in the sense of "satisfied". As such, in this case, the opposite of "happy" is not actually "sad". The opposite of happy in this case would be "unhappy" (or "unsatisfied"):
I'm unhappy with it.
I'm unsatisfied with it.
Which actually is a more natural phrase.
In general, when talking about the emotions of happiness/sadness, we tend to use the preposition "about" ("I'm happy about it" / "I'm sad about it"), whereas when expressing satisfaction/dissatisfaction regarding something, we use the preposition "with" instead ("I'm happy with it" / "I'm unhappy with it"), so the use of "with" in the phrase is also a hint about which meaning of "happy" is actually intended.