The visitors won 3-2 on the night and 6-2 on aggregate, but the Lurgan Blues could have won the home tie with an effort cleared off the line and another two hitting the woodwork.
The home side conceded a soft goal on three minutes with Oskarsson on target and things got even worse when the Icelandic team struck again on 37 minutes with a sweetly taken goal from Emilsson on the half volley.
Hamilton had a chance to pull a goal back four minutes from the break but he skied his effort over the bar.
However, Glenavon battled back to level the scores on the night with two goals in two minutes.
Kevin Braniff drilled a shot home from the edge of the box and then when the keeper was beaten by the bounce of the ball Eoin Bradley had a gaping goal to aim for and it was 2-2.
The visitors edged ahead again on 69 minutes from the penalty spot after Marshall brought down Emilsson in box and the same player made no mistake from the spot kick.
Bradley had a chance to make it 3-3 but after dashing into space he smashed his shot off the base of the post and then Conor Dillon saw his header hit the bar with the keeper beaten.