Police who went to the bedroom of 15-year-old Shane Thomas found posters of the American cult band Nirvana whose lead singer Cobain committed suicide last year.
A shotgun had been put in his mouth and fired, the same way the pop star killed himself.
South Wales police were yesterday preparing a report on the teenager's death for the local coroner. Crime is not suspected.
At the opening of an inquest at Bridgend, Mid Glamorgan, a statement by Detective Inspector John Adsley said Shane's body was found lying on the bed at his home in Ogmore Vale last Friday evening.
"It could be seen from the walls in his bedroom that he idolised the pop group Nirvana. The lead singer from this band committed suicide in America last year by putting a firearm in his mouth," the statement said.
"It would appear that he has taken his own life by similar means."
A Home Office pathologist, Dr Rick James, checked the weapon and its barrel-length and concluded it was probable Shane had pulled the trigger.
Shane's girlfriend, Claire Gregory, told police he had recently been very depressed.
The deputy Mid Glamorgan coroner, Arwel Roderick, adjourned the hearing to a later date. Shane, the eldest of four children, had been due to return to Ogmore Comprehensive School for the new term this week. His parents, Patrick and Cindy, were too upset to comment.
The school's head teacher, Sandra Davies, described Shane as a popular pupil and said his death had left everyone "devastated". She added: "We will do everything to help the children come to terms with this grief."Reuse content