Are there a mathematical function that takes the integer variable $x$ and uses a constant $k$ then,
it outputs $x$ when $x > k$
else outputs Zero
For example, when $k=5$ and,
when $x$ is given inputs $2, 3, 4, 5, 6, 7$ respectively,
It must output $0, 0, 0, 0, 6, 7$ respectively.
I want a purely mathematical equation for the function.
(Only using variables, arithmetic symbols and other functions such as the absolute function, but without using comparison operators)
Although fine answers have been given, alternatively one could do
$$f(x)=\frac x2\left(\frac{x-k}{|x-k|}+1\right)$$
Unfortunately we're dividing by $0$ if $x=k$, but if that doesn't occur, then you're good to go with this one.
Note that it is impossible to do only using variables and arithmetic symbols, since all of those are differentiable everywhere so any composition is also differentiable everywhere. We'll have to use "other functions such as the absolute function". I'm not quite sure to what extend we can use other mathematical functions, since, well, the one you described could be one.
Programatically however, as has been pointed out by @JMoravitz, a good solution would be
Or, if boolean-to-integer conversion is not your thing, you could do