One of the best ways of dealing with these people is to see that they are isolated and create situations in which they find themselves in a very hopeless minority. So, if a person is the boss, he or she can create an environment where the pessimistic people become a total minority or the single pessimistic person is left to lick his thumbs, as it were.
Well, if there are other situations where dealing with such people is inevitable, there is ever possibility that you can create some optimism in such people, by ensuring that he or she is involved in something concerning their lives. Years ago, when we had a guy with this kind of attitude in office, we took a conscious decision to make him take on small responsibilities like reminding a group of ladies (the wives of employees) who needed to assemble at a particular point for the bus to come such a place, get the water and food organized and ensure that all sit down comfortably in the bus, which was set to take off to a sort of hill station for a picnic.
To our surprise, he did the job so well. We had already decided that we would praise him for every single small work that he would do. That did the trick. He then saw that he also had some good qualities. He started to come out of his shell. In that trip, he ensured that every lady was so comfortable and became friends with each of them. We also ensured that they we ask "ask only Govindan" and hence all the ladies asked him for every small thing. It so happened that this guy had minute idea of the place we were all going to.
Hence, creating small situations like this can also help. Oftentimes, these guys have some good qualities too. Their pessimistic thinking might have happened only because of a series of bad experiences. Like having a bad boss every time in their careers. Even in different jobs. These things happen too. It will be great if we can do something about such situations. More so, when the world has changed and one single company careers are becoming history.
Yes, we can change them to some extent. If such efforts do not yield results, simply forget it and move on to do far better things that we always have on our table.