Mello simply helped Near by bringing Light, i.e., Kira, out of his hideout. By bringing Light out of his solace, Mello made it relatively easy for Near and the SPK to seize him and eventually put an end to his tyranny.