First, congratulations for realizing that you are feeling unkind. Hopefully you haven't already taken it out on someone. The self-awareness that you are having unkind thoughts or urges is an important step to being kinder. Some say taking out frustration by punching a pillow or whatever is the way to get rid of these feelings. Finding a reason to smile or laugh also works. Others meditate or pray. Still others might drown their animosity in drink, but alas many unkind feelings are excellent swimmers.
It's counter-intuitive, but when feeling unkind, do something kind for someone. Not necessarily the person towards whom you are having unkind thoughts, although that would be big of you. Religious people have preached kindness, although religion has not always practiced it. Are acts of kindness for suckers, or do they make you and the world a better place? Yes to the latter, and there is science to back it.
What is the science? I learned something abut Cognitive Behavioral Therapy on Japanese TV that made this idea click for me. People with PTSD or trauma based on other causes such as childhood abuse were given a combination of talk therapy and CBT. One of the simplest and most effective behavioral exercises was a series of lights that moved back and forth left and right, with the patients following it with their eyes, back and forth. Apparently this helps reset the confusion between the left and right hemispheres of the brain that results from trauma. This eye movement models the functioning of the normal brain. The memories and bad experiences aren't gone. You've just exercised your brain back into balance. Amazing.
Fake it until you make it. Dress for success. Act your way into a new way of thinking. Etc. These things are neurological truths apparently. Science is catching up with folk wisdom.
Fake kindness. It will make your heart kinder. And it's sure better than feeling unkind and doing nothing.