South Africa won by 10 wickets to take an unbeatable 2-1 lead in the series with one match to play.
Pakistan were dismissed for 107 in 45.4 overs, to which South Africa replied with 113 without loss in 14 overs. De Villiers scored an unbeaten 50, while Smith was 56 not out.
Wicketkeeper Mark Boucher took six catches, a record for dismissals in a one-day match for South Africa.
Boucher's feat made him the fourth player overall after Australia's Adam Gilchrist, Alec Stewart of England and West Indian Ridley Jacobs, to make six dismissals in a one-day international.
The last match of the series will be played in Johannesburg on Wednesday.
Scorecard:
Pakistan innings
Imran Nazir c Boucher b Pollock 0
Kamran Akmal run out (Gibbs) 3
Younis Khan c Kallis b Pollock 8
Mohammad Yousuf c Boucher b Hall 21
Inzamam-ul-Haq not out 45
Shoaib Malik c Boucher b Kemp 19
Abdul Razzaq b Kallis 1
Azhar Mahmood c Boucher b Kemp 1
Naved-ul-Hasan c Boucher b Ntini 3
Abdur Rehman c Boucher b Langeveldt 0
Mohammad Asif b Hall 0
Extras (lb-1 nb-1 w-4) 6
Total (all out, 45.4 overs) 107
Fall of wickets: 1-0 2-6 3-23 4-41 5-87 6-93 7-94 8-100 9-106.
Bowling: Pollock 10-4-13-2 (w-1), Ntini 10-2-20-1, Hall 6.4-0-29-2, Langeveldt 8-1-18-1 (nb-1 w-1), Kallis 8-1-17-1, Kemp 3-0-9-2 (w-2).
South Africa innings
A.de Villiers not out 50
G.Smith not out 56
Extras (w-7) 7
Total (for no wicket, 14 overs) 113
Did not bat: H.Gibbs, J.Kallis, A.Prince, J.Kemp, M.Boucher, S.Pollock, A.Hall, M.Ntini, C.Langeveldt.
Bowling: Asif 4-0-26-0 (w-6), Naved-ul-Hasan 3-0-17-0 (w-1), Mahmood 3-0-24-0, Razzaq 2-0-19-0, Rehman 2-0-27-0.
Result: South Africa won by 10 wickets.
Man-of-the-match: Shaun Pollock (South Africa).