You can use some low level commands:
\documentclass{article}
\usepackage{amsmath}
\makeatletter
\newcommand{\defeq}{\mathrel{\aban@defeq}}
\newcommand{\aban@defeq}{%
\vbox{\offinterlineskip\check@mathfonts
\ialign{\hfil##\hfil\cr
\fontsize{\ssf@size}{\z@}\normalfont def\cr
\noalign{\kern1\p@}
$\m@th=$\cr
\noalign{\kern-.5\fontdimen22\textfont2}
}%
}%
}
\makeatother
\begin{document}
\[
A=B\defeq P
\]
\end{document}
The spacing between “def” and “=” is set to one point, adapt it to your liking. The “=” is lowered by half the height of the math axis, which is available as \fontdimen22\textfont2.

Personally, I don't like such a symbol. If I were forced to use something like “it is defined to be”, I'd probably choose \coloneq, which is asymmetric. But I've never felt the mathematical need for such a symbol.
\newcommand{\defeq}{\vcenter{\hbox{\( \overset{\mathrm{def}}{=} \)}}}? – Clément Feb 08 '17 at 05:55\vcenterwill place the def-eq block a bit too low for the OP's taste. – Mico Feb 08 '17 at 06:07