# How to calculate the integral of exp(-ikt) from -infinity to zero

## Homework Statement

Hi everyone. I am trying to calculate $$f(k) = \int_{-\infty}^0 e^{-i k t} dt.$$

## Homework Equations

Of course we know that $$\int_{-\infty}^{\infty} e^{-i k t} dt = 2 \pi \delta(k)$$ and in fact (I think) I know that the answer to my question must be $$f(k) = \frac{i}{k} + \pi \delta(k).$$ But I am puzzled as to how exactly one can show that this is the answer.

## The Attempt at a Solution

I assume we need to make a substitution $$t \rightarrow t + i\epsilon,$$ use complex analysis, and eventually let $$\epsilon \rightarrow 0.$$ But how exactly do we do that? What theorem in complex analysis do we use and what would the result be before epsilon is set to zero?