Summing over General Functions of Primes and an Application to Prime $\zeta$ Function

If your function $f$ is smooth and compactly supported then the formula you are looking for already exists, and is called the "explicit formula". See for example Lemma 1 in http://arxiv.org/abs/math/0511092.

If you want to apply this lemma in the direction "primes to zeros" then you should "swap the hats" over $h$. Basically, once you have specified $\hat{h}$ to be a smooth compact function of your choice, the resulting function $h$ will be entire and you will be able to apply the lemma 1 to $h$, getting the desired formula a sum over the primes weighted by $\hat{h}$.