If you have negative co-workers around you, move to different location in the office as soon as you can. If they are truly negative co-workers, they will not realize that you have moved from that area. Ask a supervisor or manager if you can, move to an extreme corner to get away from your negative co-workers. It is much better to keep your distance than to mix and mingle with negative co-workers on a daily basis.
Focus on your work:
Try to focus on your own work if you are constantly being harassed or bothered by negative co-workers. Bury yourself in various office projects and do not allow yourself to fall in their trap. If any negative co-worker approaches you, politely tell him or her that you are busy with work. Remind them that you do not have time to waste on petty issues and that you are working hard.
Discuss with other co-workers:
Try to talk to your other co-workers and discuss the problems that you are facing. You might be surprised to find out that many other co-workers are also tired of the negative worker(s).
Talk to supervisor or manager:
If things get to a point where you can no longer deal with negative co-workers, get all the other co-workers together and meet with your manager or supervisor in a group. He or she will be in a better position to help you deal with those people. Make sure to make a written report about your negative co-workers so that everything goes on the official records.
Talk to boss:
Although your manager or supervisor should be enough to help you deal with negative co-workers, you might want to talk to your boss and alert him or her about your situation, in case you see that your supervisor is not paying much heed. This can definitely protect you from any potential backlash from your negative co-workers. While doing so however, try not to infuriate your superior. If you feel that would not be possible, then it is better to toughen up mentally (using the steps above) rather than complain.
Talk to negative co-workers:
If you are fed up with everything, go straight up to your negative co-workers and let them know how you feel about their attitude. Sometimes the direct approach is the best way to deal with issues in the office.