Crying for long periods of time releases oxytocin and endogenous opioids, otherwise known as endorphins.
https://www.healthline.com/health/benefits-of-crying
(I've done this. I have no shame.)