The gunman had briefly held a 71-year-old patient hostage in the hospital room, but released him unharmed after police intervened. No one else was injured.
The 58-year-old man died of a gunshot wound to the head. He appeared to have shot himself, but police were still investigating, Aurora Police spokesman Dan Ferrelli said.
After refusing to surrender for 4 1/2 hours, the gunman opened the door to his room at Provena Mercy Medical Center and fired one shot at police.
Police returned fire and, after hearing no further sounds, entered the room and found the man with a head wound, Ferrelli said.
The standoff began when hospital security officers reported a combative patient, who then waved a small handgun at a patrol officer.
Authorities had relocated 26 patients the floor and locked down the hospital about 30 miles west of Chicago.