While there are varying degrees of friendship needs, from a large field with several herd members to a trio or even just a pair, horses that are on their own, by contrast, can get lonely.
Just like humans, when horses are lonely, they can become depressed. Also just like humans, a common symptom of depression is becoming withdrawn, uninterested or unaware in situations around them. You can tell when your horse is withdrawn, as it will tend not to respond to things around it.
If your horse constantly paces back and forth at the fence line, that is an important sign of loneliness. It may be that there are no other horses or animals at the barn and so it sticks to the outside of the pasture out of boredom and hope. It also may be that it has a buddy who is in a separate field or who is kept in a stall.