If

is binomial, then the summation is wrong; your pmf has the kernal of a geometric random variable, but if

is really geometric then you need to be summing over the positive integers.

I'll assume you actually want to find

for geometric X; what you want to calculate is

In which case the gimmick is to notice that

The idea behind this is to interchange the infinite sum and the taking of the derivative, which is justified, though you would have to take a course in real analysis to see why.

If you really do want to calculate the expected value of a binomial, your pmf is totally wrong, and it would probably help if you used the right one, i.e. what undefined posted.