Are we supposed to forgive anything and anyone even when we are hurt badly?
Yes. Without qualifications, yes. God expects those of us who have been fogiven of a massive weight of sin by God to forgive anyone and any thing, even when we are badly hurt. God was badly hurt by our rebellion and by our rejection of him. You did much more to God than anything which has been done to you. Therefore, you MUST forgive, even if you are hurt very badly. This is the inescapable message of Matthew 18:21-35.
To forgive does not mean you are no longer hurt by what happened. You may still feel hurt, but you must be willing to let go of that hurt to the extent that you can. It also does not mean (despite what some say) that you "forget" that it happened. You will not forget! It means that you are willing to go on and not hold it against that person–that you are willing to love them and accept them despite what they did to you. It means that you not hold on to bitterness and treat them the way their behaviour toward you deserves. This is what God did for us, and he expects us to apply it to others, as is taught very clearly in Matthew 18.