The unemployed man used a firearm on the police officers after they attempted in May 2011 to forcibly enter a house where he was living in the small town of Schaffhausen in the Emmental region.
The regional court of Emmental-Oberaargau on Wednesday found the man guilty of murder and attempted murder.
The court also convicted him for endangerment of life and threatening authorities.
The police had accompanied a rent collection agent who had been ordered to evict the man after he failed to pay rent for several months.
As the policemen forced the door to the man's bedroom open, he immediately opened fire on them, according to the evidence presented to the court.
He fired four shots.
One shot tore through the upper arm of a policeman and two shots killed the second officer.
The collection agent, who was standing behind the policemen, was able to escape unharmed.
The court ruled that the convicted man must pay compensation for personal suffering and damages to the killed policeman's family, as well as the other people whose life he endangered.
While the court did not mention an exact figure, it is confirmed that the amount is in the high six figures.
— with reporting from Dominik Bärlocher