Hugs release oxytocin which lowers our heart rate and cortisol levels as fern said. I think hugs are awesome and great for your physical and mental health!
When I receive virtual hugs here it always makes me feel good and I smile. There may not be oxytocin released but there is a good effect.
I see that you are new. A warm welcome to PC. I’m sorry you are depressed and hope you feel better soon.