Image via Wikipedia
There is a principle in moral and ethics that states: "when in doubt, don't act".
I have found to exceptions to this principle. Both in Canon Law, regarding the Sacraments of Baptism and Anointment of the Sick.
If there is the slightest possibility that the person who will receive the Sacrament is dead, it is better to administer the sacrament instead of not doing so.
I believe that the same exception applies to compassion.
If you think that the person needs your support, please reach out. It is better to be told not to do so, or that there is no need to be compassionate, than leave a needed person alone.
When working with bereaved parents, we are trained to watch their body language and look for the signs to approach them in a more personal level.
In my experience, a hug is always better than leaving them alone. If you are not comfortable hugging, maybe you could reach out squeezing their arm or patting their back.
When in doubt, never, ever leave someone in pain by themselves.