There are a few metrics you can use. A good metric for pitching is FIP. It isolates pitching down to the things a pitcher can control: strikeouts, walks, and home runs. Then it builds an ERA-like number (lower is better). You can find this on FanGraphs, Baseball Ref, or lots of other sites.
Here is a cool guide to peruse as well, though it's pretty dense.