This has been an incredibly difficult week for Apple. The company shed more than $40 billion in market capitalization on Tuesday evening following its fiscal first-quarter earnings report, which showed a much steeper decline than Wall Street was expecting in both profit and iPhone sales. Then, just one day later, tragedy struck Apple’s Cupertino, California headquarters when one of the company’s employees was found dead in a conference room on campus.

The story is still unfolding two days later.

DON’T MISS: Completely change the look of your iPhone with round folder icons, no jailbreak needed

The Santa Clara County Sheriff’s Office responded to a 9-1-1 call placed from Apple’s Cupertino campus at approximately 8:35 a.m. PDT on Wednesday. According to a brief press conference later that morning, the call came from an Apple employee who said that there was a “person down” on campus. Upon responding, police found the body of a young male who was later confirmed to be an Apple employee.

On Thursday evening, the Santa Clara County coroner’s office identified the deceased male as 25-year-old Edward Mackowiak, according to Reuters. A LinkedIn page that has now been deleted listed Mackowiak as a software engineer at Apple, and the company had earlier confirmed that he was an employee.

A cause of death was then released on Friday morning. In a written statement, the Santa Clara County Sheriff’s Office said: “The Medical Examiner determined the manner of death was suicide and the cause was a gunshot to the head.”

TMZ had reported soon after the story broke on Wednesday morning that a gun was found by police near Mackowiak’s body.

“We are heartbroken by the tragic loss of a young and talented coworker,” an Apple spokesperson said on Thursday in a statement given to Matt Keller, a reporter with local ABC affiliate ABC 7. “Our thoughts and deepest sympathies go out to his family and friends, including the many people he worked with here at Apple. We are working to support them however we can in this difficult time.”

Zach Epstein has worked in and around ICT for more than 15 years, first in marketing and business development with two private telcos, then as a writer and editor covering business news, consumer electronics and telecommunications. Zach’s work has been quoted by countless top news publications in the US and around the world. He was also recently named one of the world's top-10 “power mobile influencers” by Forbes, as well as one of Inc. Magazine's top-30 Internet of Things experts.