You don't know whether k has a pdf or not. So it's not really correct to write f(k). If you assume so, it's ok.
And your whole formula is ok (actually, u(b)=1 iff b>0)
I'm wondering how could I model a r.v. which is exponentially distributed (i.e. with pdf with = the step function) but whose parameter is itself a random variable, not a fixed deterministic value.
I think I can write:
is this correct?