For King David, a certain resurrection has just occurred. His son is dead, but he is still alive, not in the same way as he was alive before his son died, but with a new life which he, in faith, begins to move into with some strength.
It does seem selfish though, doesn’t it?