The man, shirtless and barefoot, paced a large intersection while pointing the gun at his own head before turning it on St. Paul officers