Filter order by order status
I would run two queries and then you could utilise the completed() parameter:
https://craftcommerce.com/docs/craft-commerce-orders#completed

{% set pastOrders = craft.commerce.orders.completed(true).relatedTo({targetElement: currentUser, field: 'deliveryGuy'}).find() %}
{% for order in pastOrders %}
   {{order.id}}
   {{order.orderStatus.name}}
{% endfor %}

{% set pendingOrders = craft.commerce.orders.completed(false).relatedTo({targetElement: currentUser, field: 'deliveryGuy'}).find() %}
{% for order in pendingOrders %}
   {{order.id}}
   {{order.orderStatus.name}}
{% endfor %}