Monitor your conversation, and when you notice it slipping off track, pull it back, gently and subtly. If this doesn't work, bow out of the conversation. Have some graceful exit lines ready to go. Be fascinated with human beings and you'll be an excellent conversationalist. Talk to people in the office, neighbors, even strangers.
Human beings have wisdom.
Get them to share it. Negative speech will make you a negative person. Use speech wisely. It's one of the greatest gifts we have. Have a conversation, not a confrontation.