Im not sure about the measurements (coordinate system in degrees, distance in meters) but the results doesnt look unreasonable:
layer = iface.activeLayer()
#https://gis.stackexchange.com/questions/266360/pyqgis-when-we-search-based-on-the-distance-between-two-points-is-the-measurem
distance = QgsDistanceArea()
distance.setEllipsoid('WGS84')
search_distance = 50000 #m
map_pos = QgsPointXY(14.4602,57.5751)
to_select = []
for point in layer.getFeatures():
p = point.geometry()
p.convertToSingleType()
if distance.measureLine(p.asPoint(), map_pos) <= search_distance:
to_select.append(point.id())
layer.select(to_select) #If you want to select
#layer.setSubsetString('id IN{}'.format(tuple(to_select))) #To#Or filter
But there must be a MSSQL equivalent of something like postgis ST_DWithin which must be alot faster than above code?