Edelman, the world's biggest independent PR agency, has issued an apology for a blog post that described the death of actor Robin Williams as "a carpe diem moment for mental health professionals".

The agency tweeted an apology to "anyone we offended", adding "we did not intend to capitalise on the passing of a great actor who contributed so much", although it does not appear to have taken down the post.

The piece is by New York-based executive vice-president Lisa Kovitz, titled ‘Carpe Diem’ and was published the day after the news of Williams’ suicide broke.

It opens: "As we mourn the loss of Robin Williams to depression, we must recognize it as an opportunity to engage in a national conversation.

"His death yesterday created a carpe diem moment for mental health professionals and those people who have suffered with depression and want to make a point about the condition and the system that treats it.

"There’s a very careful line they need to walk so as to not seem exploitive of a terrible situation but at the same time, it is a national teachable moment that shouldn’t be ignored. (We too are balancing that line with this post.)"

The apology came after a number of negative comments on the post and criticism from publications such as Gawker, which labelled it a "soulless PR conglomerate" in a sarcastic commentary on the piece.

"Having met a dead celebrity, or being afflicted with the same form of mental illness as a recently deceased celebrity, is quite a blessing in disguise for you, the Edelman client," Gawker wrote.