I need to find the FT of this function. Here is my attempt: $$H(f) = \int_{0}^{\infty} ke^{-2 \pi i f t}dt$$ We know that $\delta(t) = \int_{-\infty}^{\infty} e^{2 \pi i f t} df$, the part with sin in this integration vanish, so that, and knowing that cos is a even function, we can write $\delta(t) = \int_{-\infty}^{\infty} e^{2 \pi i f t} df = \int_{-\infty}^{\infty} e^{-2 \pi i f t} df$.
Now, for example, $\int_{-a}^{a}x^2 = 2\int_{0}^{a}x^2$. So we can write the delta above as $\delta(t) = \int_{\infty}^{\infty} e^{-2 \pi i f t} df = 2\int_{0}^{\infty} e^{-2 \pi i f t} df$.
Putting this in the first formula $$H(f) = \int_{0}^{\infty} ke^{-2 \pi i f t}dt.$$
$$H(f) = \int_{0}^{\infty} ke^{-2 \pi i f t} dt = k \delta(f) /2$$
Now, I know this isn't right, but I don't know where is my error and what should I do.

We can express $h(t)$ with the sign function $\operatorname{sgn}(t)$ as follows $$\frac{k\,(\operatorname{sgn}(t)+1)}{2}.$$ Now take the Fourier-Transform (normalization=$1$, oscillatory factor =$-2\pi$), $$\mathcal{F}\{h(t)\}(\omega)=\frac{k}{2}\mathcal{F}\{\operatorname{sgn}(t)\}(\omega)+\frac{k}{2}\mathcal{F}\{1\}(\omega).$$ The Fourier transform of the sign function can be evaluated by observing that $\operatorname{sgn}'(t)=2\delta(t)$. The Fourier transform of $1$ is well-known. This yields $$\mathcal{F}\{h(t)\}(\omega)=\frac{k}{2}\left(\frac{1}{i\pi \omega}+\delta(\omega)\right).$$