From ControlTheoryPro.com

Contents
1 Introduction to Modeling of Mechanical Systems
1.1 Some useful equations
As anyone who has gone through Mechanical engineering knows, many real world systems can be approximated by combining spring, mass, and damper elements into an idealized model of the real world system. Tables 1 and 2 present the equations for these elements.
Description  Free Body Diagram Equation 

Damper  
Spring  
Mass 
 Notes:
 Typically the force of damper is stated as being . This is always a relative velocity between the 2 bodies connected by the damper. In this table that is explicit and instead of using the implicit relative velocity the table uses . The equivalent is true for the spring position.
 Dampers are also known by the names dashpot or linear friction.
 is the sum of all forces (Newton's 2^{nd} law).
Description  Energy 

Power dissipation in Damper  
Energy stored in Spring  or 
Energy stored in Mass 
2 Derivation of Differential Equations
State Space Tip 
Often you will have differential equations with acceleration (), velocity (), and position (). So in order to create a state space equation then and . 
Differential equations become transfer functions through the Laplace transform. State space equation are formed by directly from the differential equations (sometimes this requires some algebraic rearranging).
2.1 Start with an idealized model
This is hard part and it just takes practice. Here is procedure to help:
 Identify all elements which can move indepently. Typically these elements have mass or inertia.
 Determine the type of motion for each element. Examples are
 1D translation (such as sliding along a frictionless surface)
 1D rotation (such as a top)
 2D translation or planar motion (again sliding on a table but in doing so in both x and y axes)
 3D translation
 3D rotation (such as a spacecraft's attitude)
 6 Degree of Freedom (DOF) rigid body motion (such a spacecraft's attitude and position as it goes around it's orbit)
 Identify force/torque elements. Examples are
 Springs and dampers
 Motors
 Stiffness of a beam with 1 end fixed and the other rotating or twisting
 Draw a Free Body Diagram that includes
 Each element capable of independent motion
 Interconnections  springs, damper, rigid elements
 External forces
 Geometry relating each independent element to the forces that act on it
 Dimension, coordinate systems, angles, etc. for each independent element
 Sign conventions
2.2 Use Newton's 2^{nd} Law
Newton's 2^{nd} Law is the basis of almost all statics and dynamical system modeling. For reference it is below.
or 
where
 is the sum of all forces and is the sum of all torques,
 is the mass and is the inertia,
 is the translational position or displacement and is the angular position, and
 is the acceleration and is the angular acceleration.
With a little practice this part can become a matter of mechanical manipulation of the idealized model. In other words, once you become proficient in creating the idealized model this part is essentially a matter of remembering all the implications of Newton's 2^{nd} Law and exercising your geometry and algebra skills.
 Determine and write down the position, angle, or both of each independent element
 Using the above, deduce (via geometry, algebra, and differentiation) the following
 deflection of all springs
 rate of deflection of all dampers
 inertial linear acceleration of all masses
 inertial angular acceleration of all rotary inertias
 Write down all sign conventions (should already be done but just in case...)
 Use Newton's 2^{nd} Law to write differential equations for each free body (mass, connections, etc.)
 There should be 1 equation for each degree of freedom (i.e., 1 equation for each unknown); if you have fewer equations than degrees of freedom then you will not be able to find a unique solution but rather a solution set
 Use Table 1 and Table 2 to determine the forces applied by springs and dampers; substitute these equations (constitutive laws) into the equation set you created in the previous step using Newton's 2^{nd} Law
3 Derivation of State Space Equations
4 External Links
I borrowed heavily from the following resources:
 Mechanical Modeling Notes from Dartmouth, No Author Attributed
 Mechanical System Modeling Notes from Dr. Psiaki at Cornell, May 2008 (this appears to be a dead link)
 Mechanical Systems Modeling by Dr. Buckman at Univ. of Texas (this appears to be a dead link)