What lesson do Timon's misfortunes teach the other characters and the audience?

Among other things, we understand Timon to be a character of extremes. He was foolish in Athens to expend his bounty thoughtlessly on people who he believed to be his friends, but once he discovered they only liked him for his wealth, he left the city immediately and cursed all humanity. Later the senators urge Alcibiades not to slay everyone in Athens because only a select few are responsible for his slights; Timon would have done well to learn the same lesson. All Athens and all humanity were not his flatterers, rather many men liked and honored him, including his servants and members of the senate. But, being an extremist, Timon transformed from a man who loved giving gifts to his friends to a man who wished plague and misfortune on all.

What do you think is the role of Apemantus?

Is Apemantus really another flatterer? He comes to Timon's feast and he appears in the wilderness after Timon has discovered gold. Yet at the feast he criticizes Timon's flatterers, and says he comes to the wilderness to rub Timon's face in his misfortune. Yet there is a degree to which Apemantus seems to be a kindred spirit, even through the insults the two trade. While Apemantus has been raised poor and Timon has just become destitute, the two have a meeting of the minds while discussing their mutual dislike for mankind, and how it has devolved into a society of beasts. Yet the two men never show any affection to each other. Perhaps Apemantus doesn't want to be like the other flattering figures in Timon's life, nor does he seek to tell Timon the truth. He seems merely to want to watch. Apemantus provides both commentary on Timon's wealthy household, and a reflection of the misanthropy he later descends into.

Consider dramatic irony in this play. Particularly look at the creditors and Timon's discovery in the wilderness.

Timon borrows money from his friends in order to give gifts to these same friends. Yet when he reaches a time of financial trouble, all his friends call in their debts, ignoring the generosity he had shown them with past gifts. He borrows money in order to be generous but none are grateful. Later in the wilderness Timon digs up gold when he no longer needs it and has abandoned mankind. Now that he has become a destitute hermit, he still has flatterers humming around him, hoping for gold.