The school resource deputy jumped into action when a student collapsed during lunchtime