Although "it takes one to know one" is probably the closest we have in English it doesn't have the same implication of false accusation. What about "First take the beam out of your own eye."