MindKillazz
The rules in the rule book are clear:
You may use your political action to resign.
Your civilization immediately leaves play. You have lost.
Discard your hand and remove all cards in your play area from play. If you are party to any pact in someone else's play area, remove that pact from play.
If any wars are declared against you, the players who declared them remove their war cards from play and score 7 culture points.
If there is only one player left in the game, the game ends and that player wins.
If there are still two or more players, they continue
without you:
...
Exception: You cannot resign in Age IV.
If you find it unfair is - quite frankly irrelevant - and like pointed out by others - this needs to be taken into consideration when declaring war.
Or next time make sure your timing is better!!
Not helpful in your position but the "mistakes" in the long run make you a better player at least for the online version of the game.
Interestingly I have had not a lot of players resigning in the proper board game version but online this happens quite a lot (I do it as well)