I'm given the function $\frac{1}{z^2-4}$ and asked to evaluate it along the following contour:

To do so, I did a partial fractions decomposition:
$$\frac{1}{z^2-4}=\frac{1}{4}\left(\frac{1}{z-2}-\frac{1}{z+2} \right)$$
and added the oriented line segment starting at $-2i$ and ending at $2i$. From here, I calculated this integral by taking the antiderivative, since the curve is in a domain: $$\log(2i-2)-\log(2i+2)-\log(-2i-2)+\log(2-2i)$$ which gave a total of $\pi i$, so dividing by $4$ gives $i \pi/4$.
Applying the residue theorem, it looks like the total integral should be $-i \pi$, since we go around one pole counterclockwise, and the other clockwise, so we add them, and subtracting the difference gives $-i\pi \pi i -i \pi/4=-3 i \pi/4$.
However, I don't like this for two reasons:
It took a long time, and due to the number of steps, I think I'm prone to mistakes.
It doesn't help with slightly different functions such as $\frac{1}{z^2+1}$ which I also asked to solve
Is there a faster, and more methodological way to approach these types of problems?
There's a problem with your approach. Every non-zero complex number has infinitely many logarithms.
Consider the first half of the path (from $2i$ to $0$), Turn it into a loop going in straight line from $0$ to $2i$. You can compute the integral along this loop using Cauchy's integral theorem. And the integral along the line segment that you've added is easily computed directly from the definition. So, this gives you the integral along the first half of the path.
Now, do the same thing with second half.