The LaTeX symbol list document recommends this:
\def\dbar{{\mathchar’26\mkern-12mu d}}
Compiling this gives an error about mathcar being undefined.
A minimal example follows:
\documentclass[a4paper,11pt]{scrbook}
\def\dbar{{\mathchar’26\mkern-12mu d}}
\author{asd}
\title{asd}
\begin{document}
\maketitle
$\dbar Q = d U + \dbar W$
\end{document}
\newcommand{\dbar} {\ensuremath{\,\mathchar'26\mkern-12mu d}}
also preserves the space before dbar.