It goes without saying that your son is unhappy. Your note indicates that he displays both learning problems and emotional problems. If school is not experienced as a place where success occurs, children often do develop a negative reaction to it. So two things will be important: (a) be sure his emotional problems are being addressed - I assume they are in light of your mention of therapy and medication; and (b) be sure his learning needs are being addressed. Does the IEP contain services that are sufficient to meet his needs? Does he need additional supports in school? And, relative to the episode of smearing the feces in the bathroom, it is certainly OK to discipline him for this and at the same time understand that the behavior is symptomatic of his unhappiness. The two are not mutually exclusive.