Functionalists are committed to functional characterizations of pain. The difficulty with a functional characterization is that if it is too specific, it will be very plausible that there could be—or even are!—beings where a pain plays a somewhat different functional role, and that if it is broad, then some things that aren't pain will count as pain. In other words, while functionalism was introduced to help with the multiple-realizability problem of simple type-type identity theories, multiple-realizability comes back, though in milder form.
Think first of the great variety of functions played by pains in our own mental lives. First, it is not very plausible that there would be a single function that is played by both physical and emotional pain. When I feel pain after I touch a hot stove, that motivates avoidance. But when I am in pain that someone I cared about died, that doesn't motivate anything like avoidance. Of course, everything is similar to everything else in some way, so there will be a level of functional description which will capture both kinds of pain, but it is very likely that the description will capture lots of things other than pains as well.
Now maybe there isn't too much cost to saying that physical and emotional pain are different kinds of things that happen to have the same word applied to them, much as we call both nephrite and jadeite "jade". (If one has a hedonist theory of wellbeing, there will be a cost, as now there will be two sources of illbeing. But one shouldn't have a hedonist theory.)
The same issue, though, I think will come up between different kinds of emotional pains. It is very dubious whether there is a sufficiently robust characterization of the function of emotional pain that captures grief, guilt, terror, disappointment and boredom, but doesn't also capture things that aren't pains at all. The roles of these emotional pains are very different. But perhaps there is something to be said for the thought that these negative emotions are not of a piece, that they too shouldn't be classed together. However, at this point the theory is becoming more costly.
Let's now stick to physical pain. Plausibly, in some animals physical pain leads directly to avoidance behavior. But in humans it does not. (The instinctive jerking back from a hot stove occurs before you have pain.) So the functional role is very different. And it is dubious whether one can give a characterization of this functional role that goes beyond something very vague like "motivation to avoidance", which will include way too many things that aren't pains at all, such as the causes of aversive behavior in bacteria.
One might, of course, try to give a functional characterization that is closer to the actual functioning of our brains. Thus, one might describe the kinds of functional interconnections that happen in our brains. And it might be that sufficeintly similar interconnections happen in the brains of other vertebrates. But if the description is too close to neural structures, then we get the conclusion that aliens whose neural analogues cause very similar adaptive behavior as our brains do not have pain.