Harding carded the best score after the two rounds of qualifying at the Royal Johannesburg & Kensington Gold Club with his 14-under-par total of 130.
"I'm so happy to get through - there are about 70 players here and a lot of them have won tournaments, both on the European and Sunshine Tours, and to get one of only three spots is incredible," Harding said.
De la Riva shot a 66 on the second day to finish on 11 under par and seal his place.
"This was a tough race, this week, but the course was perfect and my game was really good, so I'm happy that it all worked out so well," he said.
Lloyd sunk a birdie on the last to seal his place at Muirfield in July with a final total of nine under par.
"I live in England and that adds to the importance of this Championship for me - it's really amazing that I'll be playing at Muirfield," he said.