Party has been locked in talks with rivals after losing its 30-year parliamentary majority in shock election result