Using C18 software I²C libraries, is there any smart way to set bus speed?
Typically what I will do is create a macro that defines my system clock frequency. #define  GetSytemClock() (41666667ul)
Then create a macro using the formula in the datasheet for calculating clock speed.
#define GetSSPBRG(i2c_clk) (((GetSystemClock()/i2c_clk)/4)-1)
Pass the i2c clock rate (Hz) you want to the macro GetSSPBRG() and it will provide the correct value for the SSPxADD register.