i did it for love
Revenge is a huge factor for both Diego and Mia, though they get it in completely different ways. And how they do affects them both deeply. Let's take a closer look.
Mia
Mia gets her revenge on Dahlia through the courtroom. Unlike Diego, she didn't go up against her directly, having learned from the price Diego paid. Instead, she defeats Dahlia at her own game.
For Mia, though, I think it's more about closure than revenge. Her first case left her shaken to the core and unable to work, and it couldn't be settled for her until Dahlia was put away. If it's revenge for Diego she wants, she doesn't show it at all, nor does she say so directly. Rather, she finds closure from it in truly closing her first case and looking to the future.
It's not just Dahlia that Mia seeks revenge against, however. There is the far more important reason that was why she became a lawyer in the first place — to find and bring to justice the man that made her mother's failure public and caused her to go into hiding. Though it's him that takes her life, she doesn't die in vain — through her death, he is finally put behind bars.
Though Mia died too young, she accomplished what she set out to do and never lost sight of who she was in the end, unlike Diego. Furthermore, though revenge was certainly a driving factor, Mia had a greater purpose in life: to defend the common, wrongly-accused man, and to pave the way for those who would follow after her through Phoenix. Countless characters are consumed with their desire for revenge at all costs, but Mia is never one of those. Instead, she takes the much more human and believable path of doing what she can given the circumstances.
Diego
Diego, on the other hand, is far more strongly motivated for revenge, though more so after his coma than before, and always for Mia's sake. He confronts Dahlia directly to try and solve the puzzles from Mia's first case, though it results in tragedy for him.
When he wakes up from his coma to find Mia is already gone, he puts the blame squarely on Phoenix Wright's shoulders. After all, since Diego wasn't there to protect her, he should have, right? But this time Diego takes Mia's route for revenge: he decides to face Phoenix in court as the masked prosecutor Godot.
Of course, as he eventually realizes, facing Phoenix at all is only a reflection of his own shortcomings, and his frustrations at being unable to save Mia. Unlike her, he is consumed by his desire for revenge, and in his methodical way gets his own revenge on Dahlia. It's only after it's done that he can look back, reflect on it, and find his own closure. For Diego, getting revenge is finding himself again. The person he became is not the same man he used to be, but it's who he has to live with.