In most all states 401k is considered deferred salary so if you withdraw from it then you are receiving salary that you no longer have deferred and it will effect your benefits. You will need to check with your agency to see how they treat this, but I would be leary of withdrawing from the 401k.