If $p < n$ then as you recognize your covariance matrix is inherently rank deficient. 

Consider $p=2$ case. If  $n=3$ you can find the ellipse defined by the estimated covariance matrix for the three points.

[![enter image description here][1]][1] [![enter image description here][2]][2]

But if $n=2$, then what is the ellipse supposed to be?! The rank deficient covariance matrix defines the degenerate ellipse that's a line segment between the two points, but other covariance matrices would be consistent with the data.


I think we'll have to know more about your problem to have an idea of how to proceed? Perhaps you want something like the [pseudo-determinant](https://en.wikipedia.org/wiki/Pseudo-determinant)?


  [1]: https://i.sstatic.net/rAI3Ym.png
  [2]: https://i.sstatic.net/3VTIYm.png