sadder but wiser

(be) sadder but wiser (unhappy but knowledgeable, about sb after an unpleasant event) — умудрённый горьким опытом; наученный горьким опытом; приобрести печальный опыт

Cliché : If someone is sadder but wiser after a bad experience, they have suffered but they have also learned something from it.
Example 1: After the accident, I was sadder but wiser, and would never make the same mistake again. (McGraw-Hill Dict)

Example 2: He left the meeting sadder but wiser, knowing that he could not ever come to an agreement with them.

Example 3: He bought a second-hand car and ended up sadder but wiser after a series of breakdowns and expensive repairs. (СIDI)