Proof of application of $f(x)$ without disclosing input $x$
Use a zk-SNARK, proving the following statement:

Private data: $x$.
Public data: $y, pk, \sigma$

I know an $x$ such that $f(x) = y \land \textsf{Ver}(pk, x, \sigma)$

Where $\textsf{Ver}$ is the secure signature scheme verifier algorithm, $x$ is the secret input, $y$ is the output of $f$ applied on $x$, $\sigma$ is the signature of $\mathcal{S}$ on $x$, and $pk$ is the public key of $\mathcal{S}$.

As long as your signature scheme does not reveal your message contents within the signature $\sigma$, your scheme will be zero-knowledge. If it does, you can hash it prior to supplying it to the protocol:

Private data: $x, \sigma$.
Public data: $y, pk, \sigma'$

I know an $x$ such that $f(x) = y \land \textsf{Ver}(pk, x, \sigma) \land H(\sigma) = \sigma'$

Where $\sigma'$ is the hash of the signature.