Firstly, be aware of the power of your peer group. It's virtually impossible to stay clean if you play with dirty people all day long.
If you want to take them with you, you have to lead by example. Simply refuse to indulge in negativity.
I think that a bit of creativity can go along way. People are usually miserable because they don't see any alternatives. They fail to see past their current circumstances and maybe you can help them see things in a different light.
Also, people tend to indulge in negativity as a way of getting attention and being 'significant'. You often see this with people who are always 'sick' and get a lot of attention when they are sick, so subconsciously they learn that their sickness will get them more attention.
Give yr friends positive reasons to feel significant and don't let their problems be the reason for their significance.