Are you a non-Ukrainian, Dutch, Latvian, or an Ukrainian, Russian, or a dual national/citizen? What would joining the fight mean for you and your nationality? On our page with the Ukrainian nationality law we also look into possible loss of your nationality / citizenship if you join the fighting.
Worldwide in at least 70 countries rendering military services to a foreign country can/will result in the loss of your own nationality/citizenship. When in doubt, don’t do it. Inform yourself. Note that our page relates to nationality / citizenship law only. There could be other criminal, military, or different (legal) negative consequences.
Countries where rendering foreign military service/aid or fighting could perhaps result in loss of nationality/citizenship: Australia, Austria, Belarus, Bosnia and Herzegovina, Cyprus, France, Georgia, Germany, Greece, Italy, Japan, Kyrgyzstan, Latvia (see page), Lithuania, Montenegro, Netherlands (see page), Romania, South Africa, Spain, Tajikistan, Turkey, Turkmenistan, Ukraine (see page), USA, Uzbekistan, and others.
Apparently Russia has no provision in law on this. However, there likely will be other (very) negative ramifications.
The full Ukraine Nationality Law ¦ Fighting in/for Ukraine info page can be found here.