What important psychological results would not have been discovered without experiments on non-human animals? Many psychological experiments involve shocking animals, playing loud sounds near them, depriving them of social contact, etc. For example, Martin Seligman's studies of learned helplessness in dogs are of this nature.

However, to my understanding, studies of learned helplessness in dogs at best provide an analogy to depression in humans, and it seems unlikely that actually shocking and trapping dogs was necessary for insight into human depression.

Similarly, Harry Harlow's studies of deprivation of maternal contact in monkeys seem to give extraordinarily obvious results, telling us what almost anyone already knows - that infants crave maternal contact. I don't think I need socially maladjusted monkeys in a laboratory in order to understand this point.

Is this wrong, or if not, what are some other counter-examples? What experiments involving inflicting physical or psychological pain on animals were necessary parts of important results in human psychology?
I think this necessarily involves some speculation. It's very hard to tell whether certain important findings would have been discovered without studies in non-human animals. We should also keep the hindsight bias in mind, that is, the tendency to retroactively claim that we 'knew it all along'. 

Another aspect to consider is that only experiments enable us to investigate the causality of a relationship that we might have already observed in a non-experimental context. For example, we might have already observed that people with depression also show signs of helplessness, but this usually isn't enough to assume a causal link between these two.

Finally, I do think there are a few findings that would have been almost impossible without research in non-human animals. For example, any knowledge that stems from the recording of individual neurons in the brain. It's currently infeasible to record data from individual neurons in humans (apart from a few patients that have medical devices implanted due to neurological disorders). So for example, our knowledge of dopamine neurons signaling reward prediction errors depended critically on research in non-human animals (Schultz et al., 1997, Science).