I wanted to give you some hints, but it soon got too complicated, so I'm posting the full solution. There are other approaches, but I like the one using reflections the most: I really find it simpler than the one at Wikipedia page, and also it is my own invention (reinvention probably, though).
I'm assuming that $X$, $Y$, and $Z$ are the orthogonal projections of $D$ onto $AB$, $BC$ and $CA$. If so, then you are trying to prove the existence of Simson line. Consider the following picture:
$\hspace{20pt}$
where $AA'$ is the diameter and $D_{AB}$, $D_{BC}$, $D_{CA}$ are reflections of $D$ across $AB$, $BC$ and $CA$ respectively. From properties of reflection (composition of two reflections is a rotation around the intersection of their axes) we know that $D_{AB}$ is an image of $D_{BC}$ in rotation around $B$ by angle $2\angle CBA$ (i.e. the triangle $\triangle D_{AB}BD_{BC}$ is isosceles), hence $$\angle D_{AB}D_{BC}B = 90^\circ-\angle ABC = \angle A'BC.$$ For similar reasons, $\angle D_{CA}D_{BC}C = \angle BCA$. Moreover, since $D_{BC}$ is a reflection of $D$ via $BC$, we have $\angle BD_{BC}C = \angle BDC$. Obviously $D_{AB}$, $D_{BC}$ and $D_{CA}$ are collinear if and only if green and blue angles sum up to $180^\circ$, in other words $\angle BDC = \angle BA'C$, but that happens if and only if $P$ belongs to the circumcircle of $ABC$.
Finally, points $X$, $Y$ and $Z$ are images of $D_{AB}$, $D_{BC}$ and $D_{CA}$ respectively in homothety centered at $D$ and ratio $\frac{1}{2}$ (that is, for example, $X$ is the midpoint of $DD_{AB}$). It follows that $X$, $Y$ and $Z$ are collinear if and only if $D_{AB}$, $D_{BC}$ and $D_{CA}$ are collinear, that is, if and only if $D$ belongs to circumcircle of $ABC$.
It is worth noting, that if $D_{AB}$, $D_{BC}$ and $D_{CA}$ are collinear, then they are also collinear with the orthocenter of $ABC$, e.g. see here.
Check out also the Wikipedia and MathWorld.
I hope this helps ;-)