Gustav Akerland, the 60-year-old acting mayor of Annapolis, died yesterday afternoon in Anne Arundel General Hospital, four days after he was found shot in the head in his office after apparently attempting suicide.

Letters and memos that Akerland left on his deck suggested that he had become deeply depressed while trying to prepare the city budget, police said. Some friends, however, wondered if something more serious had been troubling the mayor.

He underwent emergency surgery after being admitted to the hospital on Saturday night and emerged in critical but stable condition. Yesterday morning his condition deteriorated and he died at 2:35 p.m., with two sisters by his side. He had never regained consciousness.

Akerland first came to Annapolis in the 1950s and later retired to the city after a 35-year career in the Air Force. Elected to the city's Council of Aldermen in 1977, he was chosen to finish the term of Mayor John Apostol, a fellow Republican who resigned abruptly in March and moved to Florida.

Akerland, known for tremendous energy and devotion to detail, appears to have had no plans to seek a full term as the mayor in elections scheduled for next month. He did intend to run again for his alderman's seat however.

Police found Akerland at about 9:30 p.m. Saturday night when they went to his Duke of Gloucester Street office to check an alarm that had been activated. He was sprawled on the floor, a semiautomatic .22-caliber rifle and four spent cartridge cases beside him.

Police believe that Akerland shot himself once in the head, then, trailing blood, stumbled around the office and activated a silent alarm, perhaps intentionally. He then returned to the rifle and fired three more shots, one of them striking him again in the head.

The acting mayor had tried to buy a handgun earlier in the day, police investigators found, but was told that Maryland law required a seven-day waiting period. He then bought the rifle, which by law he could take without delay.