I thought that the fact that he was the sole actor and carried the the whole movie himself in I am Legend, deserves an award in itself.
However, Pursuit of Happyness was a better movie IMO because of the emotion and passion that WS showed in that movie.
In regarRAB of storyline etc, then I think that is down to personal choice.
No doubt, Will Smith has shown how diverse his talent is by showing of his character as being complex and emotional in one, whilst showing a total focused and disciplined.....and also a ruthless one in the other.
Personally, as much as I enjoyed I am Legend, I am in no rush to watch it again. Whereas, Pursuit of Happyness is a film I would definitely watch again.