Abdullah Ibn Masood R.A said The Prophet SAW said: “He is not one of us who strikes his cheeks, rends his garment, or cries with the cry of the Jahiliyyah.” (Muslim and Bukhari)
This Hadith makes it clear that doing Noha beating yourself is a forbidden act. Islam has taught us to do patience no matter whatever difficulty comes. Allah SWT says in Quran take help of Salah and patience in every difficulty.
So we should do patience and take help of Salah whenever hard time comes on us.