On the third largest eigenvalue of graphs