I think his most badass scene is when he gives up on enlightenment and then pays the chinese man so that Ehrlich can stay and smoke opium for 5 years before returning to the valley.
I actually like what they did instead, Richard's loyalty/compassion forced Gavin to see that he had become very corrupt and immoral and to have Richard of all people be the only one to tell him the truth and stand up for him when he would never do so, makes him need to find himself and become a better person. Now of course they keep it that gavin still did the dick thing by leaving, but in one way he is off to become a better person, and perhaps recapture who he was when he started out with peter Gregory, so it was an amazing bit of character development while still being a dick move.
Richard had the formula and patent, and VCs will probably race to fund them despite his past mistakes. If Gavin stayed on, he would only have interfered with their progress. The only thing that Gavin could have done more was to give them money, but I don't think they'll need it from him. Plus, this is the first act of kindness Gavin has ever shown in SV.
Ohhhhhh when Gilfoyle said that thing about the dick pick, I thought he was alluding to something Gavin wrote on the portrait, but he's just making a joke about Dinesh's job at Periscope. Got it