Fail2ban does work in FreeBSD. You will have to tweak configs for it to work with pf firewall.
/usr/local/etc/fail2ban/jail.conf
[ssh-pf]
enabled = true
filter = bsd-sshd
action = pf
logpath = /var/log/auth.log
maxretry = 3
[ssh-ddos]
enabled = true
filter = sshd-ddos
action = pf
logpath = /var/log/auth.log
maxretry = 3
/usr/local/etc/fail2ban/action.d/pf.conf
[Definition]
actionban = pfctl -t fail2ban -T add <ip>
actionunban = pfctl -t fail2ban -T delete `pfctl -t fail2ban -T show 2>/dev/null | grep <ip>`
[Init]
port = ssh
localhost = 127.0.0.1
/etc/pf.conf
ext_if = "em0"
table <fail2ban> persist
block in quick on $ext_if from <fail2ban> to any
/etc/rc.conf
pf_enable="YES"
pf_rules="/etc/pf.conf"
fail2ban_enable="YES"