  We prove the first cases of a conjecture by Darmon--Rotger on the
non-vanishing of generalized Kato classes attached to elliptic curves $E$ over
$\mathbf{Q}$ of rank $2$. Our method also shows that the non-vanishing of
generalized Kato classes implies that the $p$-adic Selmer group of $E$ is
$2$-dimensional. The main novelty in the proof is a formula for the leading
term at the trivial character of an anticyclotomic $p$-adic $L$-function
attached to $E$ in terms of the derived $p$-adic height of generalized Kato
classes and an enhanced $p$-adic regulator.
