Optical analog signal processing has been gaining significant attention as a way to overcome the speed and energy limitations of digital techniques. Metasurfaces offer a promising avenue towards this goal due to their efficient manipulation of optical signals over deeply subwavelength volumes. To date, metasurfaces have been proposed to transform signals in the spatial domain, e.g., for beam steering, focusing, or holography, for which angular-dependent responses, or nonlocality, are unwanted features that must be avoided or mitigated. Here, we show that the metasurface nonlocality can be engineered to enable signal manipulation in the momentum domain over an ultrathin platform. We explore nonlocal metasurfaces performing basic mathematical operations, paving the way towards fast and power-efficient ultrathin devices for edge detection and optical image processing.