Given $X$ is a random variable, how to calculate the covariance $\text{cov}(X,1_{\{X>\text{VaR}_{\alpha}(X)\}})$?
Here, the indicator function is defined as $$ 1_{\{X>\text{VaR}_{\alpha}(X)\}} = \begin{cases} 1& X>\text{VaR}_{\alpha}(X),\\ 0& \text{otherwise}. \end{cases} $$ And $\text{VaR}_{\alpha}(X)$ denotes value-at-risk of $X$ at a confidence level $1-\alpha$ where $0<\alpha<1$ defined as, $$ \text{VaR}_{\alpha}(X) = \inf{x: P(X>x) \leq \alpha}. $$
What you are trying to compute is called Expected Shortfall. It is misleading to call it covariance of....That depends on first how you computed the Var(X) quantity. Do you have an analytic expression for the density of the variable $X$? or do you compute it with Monte Carlo?