ANSWER:

This is not authentic.

https://islamqa.info/en/answers/152611/the-reports-which-suggest-that-the-prophet-blessings-and-peace-of-allah-be-upon-him-contemplated-suicide-are-flawed-in-both-their-chains-of-narration-or-their-texts

Sheikh I have heard that when the revelation stop coming to Prophet Muhammad (PBUH) for sometimes he felt to commit suicide?