Bayes prior in MAP estimation corresponding to $\ell^0$ penalization I gather that in the context of penalized least squares, we can interpret a penalty term as corresponding to a prior $\pi(\beta)\propto \exp\{-\text{pen}\}.$
Is this also true for $\ell^0$ regularization,i.e. $\pi(\beta)\propto \exp\{-\lambda\|\beta\|_0\}$?

No.
On $\mathbb{R}^n$, a density $\pi(\beta)$ such that $\pi(\beta) \propto \exp{-\lambda \| \beta \|_0}$ won't integrate to 1. To see this, note that $\| \beta\|_0 = n$ on the set of $\beta$ with no zero entries, so that the density is uniform over this set of infinite measure.
