We are commanded to emulate God by doing everything we do with kindness and honesty; this is what is meant by "walking in His ways." The Midrash (Sifre Deuteronomy 49) explains: Just as He is compassionate, so should you be compassionate. Just as He is righteous, so should you be righteous. Just as He is holy, so should you be holy.
Now don't kid yourself into thinking that God has negative traits like anger and jealousy. In order to be angry or jealous, one must be frustrated with things not going his way or upset over something he wishes to possess. These traits require a lack on the part of the angry or jealous person. God, by definition, is complete and lacks nothing. He does not "feel" anger or jealousy. When the Torah describes Him as angry or jealous, it's a short-hand way of saying that He treated someone in the way we would respond when angry or jealous. These are not actually traits of God and we cannot justify these traits in ourselves by claiming that we are emulating Him.
The reason for this mitzvah is simple enough: God wants what's best for us. He gave us a road map to elevate ourselves by emulating Him. Doing so improves ourselves and improves the world.
This mitzvah applies in all times and places. It is discussed in the Talmud in tractate Sotah (14a). It is codified in the Mishneh Torah in the first chapter of Hilchos De’os. This mitzvah is #8 of the 248 positive mitzvos in the Rambam’s Sefer HaMitzvos and #6 of the 77 positive mitzvos that can be observed today as listed in the Chofetz Chaim’s Sefer HaMitzvos HaKatzar.