Is it advisable to contact a professor if I fear failing a graduate-level course?
When I read the headline, my immediate impulse was to say "yes, of course" - assuming, that the course is still running and you need advice on how to proceed and come to a good result. 

After reading the full question, my answer is a clear "no". I'm located in Germany, but I assume the following thoughts are applicable to the US too:


If you explain your situation to the professor right now, it will feel like you want to influence his objective grading attitude. I would never accept such an attempt and I would in fact be angry because just because you told me, I will be influenced. I won't rate you better, but I might even be stricter in cases where I'm unsure whether I should give a point more or less, just to avoid beeing unfair towards the other students.
If the professor would react on your situation, it might even be illegal, it would be definitely unethical. In the worst case, he could be fired. #Everyone has to be treated equally.
Most (all?) universities have defined rules on how to treat sickness, bad personal circumstances, etc. You should check your local regulations and get advice from either other faculty members, students organizations or the responsible university staff. In many cases, there are options to re-do an exam. 
You should check the regulations mentioned before, but I would not take any measures before the results are out. After they are published, you could ask the professor on advice on how to proceed and explain your situation afterwards. Maybe there are some options like a second attempt or otherwise.