Welcome to the forum and congrats on your tractor.
The first thing you'll need is your tractor serial number and if possible, the OEM filter model that is for that tractor.
Loaded with those 2 pieces of information, hit a couple car part stores. I walked in last week with the OEM part # for my tractor's filter and through a quick cross-reference, found the one I needed.
I did a quick google search for Mahindra 4110 oil filter and here's some results that appeared. PLEASE NOTE!!! I did not explicitly cross-reference these to the OEM # nor confirm these so double check.
Purolater L14619
Fram PH3985
Lee LF2801
WIX 51626
AC PF9
NAPA 1626 & there may be another NAPA.
K&N2007
Regarding your oil being dirty, that's the nature of a diesel. Being the new owner, it's best to change it but don't be surprised if after you change your oil, it doesn't look black again even after just a couple minutes of running. Yea, it's disheartening but that's just the way things are with diesels.