We study a generalization of the Expected Discounted Penalty Function (EDPF) for a class of two-sided jump Lévy processes having positive jumps with a rational Laplace transform. Our first result provides an explicit expression for the generalized EDPF in terms of functions depending only on the parameters of the Lévy process . Later on, we apply our results to study a measure of asymptotic dependence for the severity of ruin on the surplus prior to ruin, for the class of Lévy risk processes considered in this work.