We provide a unified analytical treatment of first passage problems under an affine state-dependent jump-diffusion model (with drift and volatility depending linearly on the state). Our proposed model, that generalizes several previously studied cases, may be used for example for obtaining probabilities of ruin in the presence of interest rates under the rational investement strategies proposed by Berk & Green (2004).