Daniel Lawley picked up a hammer from a display at The Range in Willenhall and hit former friend Lee Dixon with it about five times "in a frenzy" on October 11, 2020, Wolverhampton Crown Court heard on Tuesday.
Lawley, 35, had been in a relationship with a woman for a number of years before she left him for Dixon, who had been his friend for many years, for a period of about five months.
But at the time of the incident at Longacres Industrial Estate, Lawley, of Allerton Lane, in West Bromwich, was back together with the woman.
Mr Charles Crinion for the prosecution said: "Daniel Lawley had been in a relationship for several years, then the victim was in a relationship with her for a few months.
"During the victim's relationship with her Mr Lawley made threats of violence and there was one occasion that is described when the defendant was following them armed with a baseball bat.
"The relationship between the victim and the woman ended and the relationship started with the defendant.
"Two days before the assault the defendant attended Dixon's work but did not speak to him.
Threat to kill
"On October 11 at about 1.50pm Dixon was at The Range and was struck with a hammer to his head.
"He heard the defendant shout 'I'm going to kill you, you scumbag'.
"Mr Dixon believes he was struck at least five times.
"A witness says she saw the defendant strike Dixon twice with extreme force and a number of extra blows after that. She said the defendant was in a frenzy.
"She shouted to stop and went to the victim's aid. A substantial amount of blood went onto her clothes.
"Mr Dixon was taken to New Cross Hospital then the QE Hospital and was told his skull had been fractured and an operation was needed. He was in hospital for the following six days.
"He now has a considerable scar to his head."
In a victim impact statement read out by Mr Crinion, Mr Dixon said he had physical issues with his speech and walking.
"I'm nervous about going out anywhere, especially on my own," the statement read.
'Out of character'
Mr Gary Cook for the defence said the offence was not premeditated.
"He pleaded guilty at an early stage, that took courage and honesty," he added.
"This extreme attack is out of his character.
"He is not a bad man, he did a bad thing under considerable strain."
Lawley pleaded guilty to causing grievous bodily harm with intent and was handed seven years and six months in prison by Judge Rhona Campbell. He will have to serve two thirds before he is considered for release.
He had also been charged with possession of an offensive weapon in a public place, which the judge directed to lie on file.
She said: "The facts of this offence are stark. There was, I accept, provocation in the background context but there was no immediate provocation at the time of the offence.
"I accept your partner's behaviour in leaving you for a five- to six-month period for your friend of many years placed you under considerable strain.
"All of this incident was witnessed by others including two children."