Thoughts Towards Others
When you think about other people, what is happening? Anyone you think of is part of your brain, and your self-identity is another part of your brain, an analytical part that identifies itself as you. When you think about others then you are analysing that part of yourself that you associate with the other person. You can never know everything about another person; that would require a brain as big as theirs, and besides, we can never know a lifetime of experience and feeling that another person has.
So each person we know is reflected as a part of our own brain, a fragmentary pattern of our experiences of that person.
As such, positive thoughts towards others make us happy because those thoughts are sent to that part of our brain, and negative thoughts affect us in the same way. We don't like or dislike another other person, but the part of ourselves we think of as the other person.
People we know more about take up more of our brain, and for the sake of efficiency some parts are shared. If we know a piano player and meet a second, it makes sense to add a bit of extra information about the new person from the old. It's not efficient to create a complete new file about every new person, and for the most part, it's much more efficient to cross-share information. This is the root of prejudice, we know fragments about one person, but other information about them is shared with past experiences about other people we think of as similar to them.
In such cases, groups are treated like simple individuals, with global traits that can be shared among individuals we encounter that fit into that category.
As such, positive thoughts to a type of people have the power to make us happier than positive thoughts to just one person, although this depends on the knowledge we've acquired about the group or person. People we know intimately take up a larger part of our brain, and so how we think and feel about them affects us more deeply. It is especially important then, for happiness, to think positively about people and groups we know well. This is why being betrayed by a close person can feel so bad, as the large amount of brain we associate with that person is suddenly thought of negatively.
To remain happy it is important to think of others positively, because what we think of as other people is a part of ourselves. We tend to avoid people who treat us badly, but memories of bad people can remain. It's important to either forget or ignore those people, therefore shrinking the part of our mind we associate with them, or transform them into a positive force. It is not possible to dislike someone or a group and remain happy, because the part we dislike is part of ourselves.