I mean, itâ€™s your choice, but I really think that youâ€™re overcomplicating things in this case.
Bear in mind that you need only keep one such temporary NodePath, so garbage collection neednâ€™t be significantly affected.
[edit]
You donâ€™t have to: just set your NodePath to have the relevant HPR values (and position, if called for), tweak those values as you like (such as by setting the pitch to zero), and then call â€śgetQuat().getForward()â€ť.
[/edit]
However, as I said, it is your choice, and Iâ€™ve made my case, so let me try to help with what youâ€™re asking:
I think that there are essentially two steps to add to your process:
 First, the calculation of the zcoordinate of your vector.
 And second, the calculation of the length of the horizontal component of your vector.
The first is fairly straightforward: it should be much as you already have for x and y, but using the pitch instead of the heading. Presuming that a pitch of zero corresponds to a horizontal vector, I think that this would mean that the zcoordinate would be calculated using sine.
The second may call for some explanation:
Consider an arbitrary vector:
(ASCII art time! :P)
^

......
z  /:
 / :
/____:______>
0 horizontal
The more vertical the vectorâ€“the higher the zvalueâ€“the less horizontal it is. A fullyvertical vector has a horizontal length of zero, and a fullyhorizontal vector has a vertical length of zero.
The horizontal component of the vector is, of course, composed of the x and y coordinates of the vector.
So, to account for this matter we can adjust the length of the x and y components of our vector.
Simply put, as we calculate the length of our vertical (z) component via sine, we calculate (if I have it aright) the horizontal component via cosine.
This gives us a length for the entire horizontal component, not the individual x and y components. But since the previouslycalculated x and y components are essentially the proportions that those components make up from a unitlength, we can just multiply each by the new horizontal length and get the final result!
Now, let me note: I havenâ€™t doublechecked any of this, so I may have made mistakes.