In the poem, the speaker experiences anger and wrath toward his friend, but when he talks to his friend about it, this puts an end to his negative feelings. However, when he feels anger and wrath toward his enemy, he does not talk about it, and so his negative feelings grow. The speaker continues to nurse these feelings, and so they grow bigger and bigger and eventually result in the death of his foe. The speaker is "glad" to see his foe dead beneath his tree.
Merriam Webster defines anger as a strong feeling of displeasure and usually antagonism (opposition or hostility). Wrath, on the other hand, suggests revenge and retribution for a wrong or slight. When the speaker talks to his friend about his feelings, it takes away his need to exact revenge for whatever created the anger to begin with; when he decides not to address his foe concerning his feelings, his need to seek revenge on his foe—to wrathfully punish him for whatever he did to the speaker to make him so angry—is permitted to remain and grow, like the poison tree.
His experiences allow us to see a literal representation of what happens, figuratively, when we fail to address our anger and wrath. Wrath incites us to act on our anger, to become violent, to punish another, and this is where it seems to cross the line from anger, which is a socially acceptable feeling (as opposed to wrath, which is not).